[2025-03-02 00:00:05] Production.INFO: next invoice date [2025-03-02 00:00:05] Production.INFO: 2025-03-30 [2025-03-02 00:00:05] Production.INFO: getdaysdiff [2025-03-02 00:00:05] Production.INFO: +28 [2025-03-02 00:00:05] Production.INFO: call prc_setAccountDiscountPlan (205,11,1,28,28,'RMScheduler',2025-03-02 00:00:05,0,0,,,0) [2025-03-02 00:00:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:00:07 [end_date_ymd] => 2025-03-02 00:00:07 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:00:07' and `end` < '2025-03-02 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-03-02 00:00:19] Production.INFO: count ==999 [2025-03-02 00:00:20] Production.ERROR: pbx CDR StartTime 2025-03-01 21:00:07 - End Time 2025-03-02 00:00:07 [2025-03-02 00:00:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:00:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587314', 'tblTempUsageDetail_20' ) start [2025-03-02 00:00:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587314', 'tblTempUsageDetail_20' ) end [2025-03-02 00:00:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587314', 'tblTempVendorCDR_20' ) start [2025-03-02 00:00:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587314', 'tblTempVendorCDR_20' ) end [2025-03-02 00:00:20] Production.INFO: ProcessCDR(1,14587314,1,1,2) [2025-03-02 00:00:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587314,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:00:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587314,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:00:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587314,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:00:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587314,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:00:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587314', 'tblTempUsageDetail_20' ) start [2025-03-02 00:00:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587314', 'tblTempUsageDetail_20' ) end [2025-03-02 00:00:25] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:00:25] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:00:28] Production.INFO: ==10637== Releasing lock... [2025-03-02 00:00:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:00:28] Production.INFO: 36.5 MB #Memory Used# [2025-03-02 00:01:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:01:05 [end_date_ymd] => 2025-03-02 00:01:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:01:05' and `end` < '2025-03-02 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-03-02 00:01:17] Production.INFO: count ==1010 [2025-03-02 00:01:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:01:05 - End Time 2025-03-02 00:01:05 [2025-03-02 00:01:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587319', 'tblTempUsageDetail_20' ) start [2025-03-02 00:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587319', 'tblTempUsageDetail_20' ) end [2025-03-02 00:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587319', 'tblTempVendorCDR_20' ) start [2025-03-02 00:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587319', 'tblTempVendorCDR_20' ) end [2025-03-02 00:01:17] Production.INFO: ProcessCDR(1,14587319,1,1,2) [2025-03-02 00:01:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587319,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:01:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587319,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:01:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587319,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:01:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587319,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:01:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587319', 'tblTempUsageDetail_20' ) start [2025-03-02 00:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587319', 'tblTempUsageDetail_20' ) end [2025-03-02 00:01:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:01:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:01:21] Production.INFO: ==10740== Releasing lock... [2025-03-02 00:01:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:01:21] Production.INFO: 35.25 MB #Memory Used# [2025-03-02 00:02:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:02:06 [end_date_ymd] => 2025-03-02 00:02:06 [RateCDR] => 1 ) [2025-03-02 00: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-03-01 21:02:06' and `end` < '2025-03-02 00: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-03-02 00:02:25] Production.INFO: count ==280 [2025-03-02 00:02:25] Production.ERROR: pbx CDR StartTime 2025-03-01 21:02:06 - End Time 2025-03-02 00:02:06 [2025-03-02 00:02:25] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:02:25] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587324', 'tblTempUsageDetail_20' ) start [2025-03-02 00:02:25] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587324', 'tblTempUsageDetail_20' ) end [2025-03-02 00:02:25] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587324', 'tblTempVendorCDR_20' ) start [2025-03-02 00:02:25] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587324', 'tblTempVendorCDR_20' ) end [2025-03-02 00:02:25] Production.INFO: ProcessCDR(1,14587324,1,1,2) [2025-03-02 00:02:25] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587324,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:02:26] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587324,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:02:26] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587324,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:02:29] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587324,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:02:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587324', 'tblTempUsageDetail_20' ) start [2025-03-02 00:02:29] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587324', 'tblTempUsageDetail_20' ) end [2025-03-02 00:02:29] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:02:29] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:02:29] Production.INFO: ==10827== Releasing lock... [2025-03-02 00:02:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:02:29] Production.INFO: 31 MB #Memory Used# [2025-03-02 00:03:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:03:05 [end_date_ymd] => 2025-03-02 00:03:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:03:05' and `end` < '2025-03-02 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-03-02 00:03:19] Production.INFO: count ==287 [2025-03-02 00:03:19] Production.ERROR: pbx CDR StartTime 2025-03-01 21:03:05 - End Time 2025-03-02 00:03:05 [2025-03-02 00:03:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:03:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587329', 'tblTempUsageDetail_20' ) start [2025-03-02 00:03:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587329', 'tblTempUsageDetail_20' ) end [2025-03-02 00:03:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587329', 'tblTempVendorCDR_20' ) start [2025-03-02 00:03:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587329', 'tblTempVendorCDR_20' ) end [2025-03-02 00:03:19] Production.INFO: ProcessCDR(1,14587329,1,1,2) [2025-03-02 00:03:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587329,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:03:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587329,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:03:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587329,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:03:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587329,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:03:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587329', 'tblTempUsageDetail_20' ) start [2025-03-02 00:03:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587329', 'tblTempUsageDetail_20' ) end [2025-03-02 00:03:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:03:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:03:22] Production.INFO: ==10916== Releasing lock... [2025-03-02 00:03:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:03:22] Production.INFO: 31 MB #Memory Used# [2025-03-02 00:04:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:04:05 [end_date_ymd] => 2025-03-02 00:04:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:04:05' and `end` < '2025-03-02 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-03-02 00:04:17] Production.INFO: count ==287 [2025-03-02 00:04:18] Production.ERROR: pbx CDR StartTime 2025-03-01 21:04:05 - End Time 2025-03-02 00:04:05 [2025-03-02 00:04:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:04:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587334', 'tblTempUsageDetail_20' ) start [2025-03-02 00:04:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587334', 'tblTempUsageDetail_20' ) end [2025-03-02 00:04:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587334', 'tblTempVendorCDR_20' ) start [2025-03-02 00:04:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587334', 'tblTempVendorCDR_20' ) end [2025-03-02 00:04:18] Production.INFO: ProcessCDR(1,14587334,1,1,2) [2025-03-02 00:04:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587334,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:04:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587334,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:04:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587334,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:04:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587334,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:04:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587334', 'tblTempUsageDetail_20' ) start [2025-03-02 00:04:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587334', 'tblTempUsageDetail_20' ) end [2025-03-02 00:04:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:04:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:04:22] Production.INFO: ==10999== Releasing lock... [2025-03-02 00:04:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:04:22] Production.INFO: 31 MB #Memory Used# [2025-03-02 00:05:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:05:05 [end_date_ymd] => 2025-03-02 00:05:05 [RateCDR] => 1 ) [2025-03-02 00: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-03-01 21:05:05' and `end` < '2025-03-02 00: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-03-02 00:05:17] Production.INFO: count ==286 [2025-03-02 00:05:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:05:05 - End Time 2025-03-02 00:05:05 [2025-03-02 00:05:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587339', 'tblTempUsageDetail_20' ) start [2025-03-02 00:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587339', 'tblTempUsageDetail_20' ) end [2025-03-02 00:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587339', 'tblTempVendorCDR_20' ) start [2025-03-02 00:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587339', 'tblTempVendorCDR_20' ) end [2025-03-02 00:05:17] Production.INFO: ProcessCDR(1,14587339,1,1,2) [2025-03-02 00:05:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587339,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:05:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587339,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:05:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587339,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:05:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587339,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:05:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587339', 'tblTempUsageDetail_20' ) start [2025-03-02 00:05:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587339', 'tblTempUsageDetail_20' ) end [2025-03-02 00:05:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:05:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:05:20] Production.INFO: ==11075== Releasing lock... [2025-03-02 00:05:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:05:20] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 00:06:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:06:05 [end_date_ymd] => 2025-03-02 00:06:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:06:05' and `end` < '2025-03-02 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-03-02 00:06:17] Production.INFO: count ==289 [2025-03-02 00:06:18] Production.ERROR: pbx CDR StartTime 2025-03-01 21:06:05 - End Time 2025-03-02 00:06:05 [2025-03-02 00:06:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:06:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587344', 'tblTempUsageDetail_20' ) start [2025-03-02 00:06:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587344', 'tblTempUsageDetail_20' ) end [2025-03-02 00:06:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587344', 'tblTempVendorCDR_20' ) start [2025-03-02 00:06:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587344', 'tblTempVendorCDR_20' ) end [2025-03-02 00:06:18] Production.INFO: ProcessCDR(1,14587344,1,1,2) [2025-03-02 00:06:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587344,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:06:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587344,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:06:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587344,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:06:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587344,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:06:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587344', 'tblTempUsageDetail_20' ) start [2025-03-02 00:06:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587344', 'tblTempUsageDetail_20' ) end [2025-03-02 00:06:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:06:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:06:21] Production.INFO: ==11163== Releasing lock... [2025-03-02 00:06:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:06:21] Production.INFO: 31 MB #Memory Used# [2025-03-02 00:07:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:07:06 [end_date_ymd] => 2025-03-02 00:07:06 [RateCDR] => 1 ) [2025-03-02 00: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-03-01 21:07:06' and `end` < '2025-03-02 00: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-03-02 00:07:18] Production.INFO: count ==290 [2025-03-02 00:07:18] Production.ERROR: pbx CDR StartTime 2025-03-01 21:07:06 - End Time 2025-03-02 00:07:06 [2025-03-02 00:07:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587349', 'tblTempUsageDetail_20' ) start [2025-03-02 00:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587349', 'tblTempUsageDetail_20' ) end [2025-03-02 00:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587349', 'tblTempVendorCDR_20' ) start [2025-03-02 00:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587349', 'tblTempVendorCDR_20' ) end [2025-03-02 00:07:18] Production.INFO: ProcessCDR(1,14587349,1,1,2) [2025-03-02 00:07:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587349,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:07:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587349,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:07:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587349,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:07:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587349,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:07:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587349', 'tblTempUsageDetail_20' ) start [2025-03-02 00:07:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587349', 'tblTempUsageDetail_20' ) end [2025-03-02 00:07:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:07:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:07:21] Production.INFO: ==11248== Releasing lock... [2025-03-02 00:07:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:07:21] Production.INFO: 31 MB #Memory Used# [2025-03-02 00:08:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:08:05 [end_date_ymd] => 2025-03-02 00:08:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:08:05' and `end` < '2025-03-02 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-03-02 00:08:17] Production.INFO: count ==290 [2025-03-02 00:08:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:08:05 - End Time 2025-03-02 00:08:05 [2025-03-02 00:08:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587354', 'tblTempUsageDetail_20' ) start [2025-03-02 00:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587354', 'tblTempUsageDetail_20' ) end [2025-03-02 00:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587354', 'tblTempVendorCDR_20' ) start [2025-03-02 00:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587354', 'tblTempVendorCDR_20' ) end [2025-03-02 00:08:17] Production.INFO: ProcessCDR(1,14587354,1,1,2) [2025-03-02 00:08:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587354,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:08:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587354,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:08:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587354,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:08:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587354,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:08:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587354', 'tblTempUsageDetail_20' ) start [2025-03-02 00:08:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587354', 'tblTempUsageDetail_20' ) end [2025-03-02 00:08:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:08:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:08:21] Production.INFO: ==11370== Releasing lock... [2025-03-02 00:08:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:08:21] Production.INFO: 31 MB #Memory Used# [2025-03-02 00:09:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:09:06 [end_date_ymd] => 2025-03-02 00:09:06 [RateCDR] => 1 ) [2025-03-02 00: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-03-01 21:09:06' and `end` < '2025-03-02 00: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-03-02 00:09:18] Production.INFO: count ==297 [2025-03-02 00:09:18] Production.ERROR: pbx CDR StartTime 2025-03-01 21:09:06 - End Time 2025-03-02 00:09:06 [2025-03-02 00:09:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587359', 'tblTempUsageDetail_20' ) start [2025-03-02 00:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587359', 'tblTempUsageDetail_20' ) end [2025-03-02 00:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587359', 'tblTempVendorCDR_20' ) start [2025-03-02 00:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587359', 'tblTempVendorCDR_20' ) end [2025-03-02 00:09:18] Production.INFO: ProcessCDR(1,14587359,1,1,2) [2025-03-02 00:09:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587359,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:09:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587359,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:09:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587359,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:09:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587359,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:09:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587359', 'tblTempUsageDetail_20' ) start [2025-03-02 00:09:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587359', 'tblTempUsageDetail_20' ) end [2025-03-02 00:09:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:09:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:09:21] Production.INFO: ==11452== Releasing lock... [2025-03-02 00:09:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:09:21] Production.INFO: 31 MB #Memory Used# [2025-03-02 00:10:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:10:06 [end_date_ymd] => 2025-03-02 00:10:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:10:06' and `end` < '2025-03-02 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-03-02 00:10:18] Production.INFO: count ==305 [2025-03-02 00:10:18] Production.ERROR: pbx CDR StartTime 2025-03-01 21:10:06 - End Time 2025-03-02 00:10:06 [2025-03-02 00:10:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587365', 'tblTempUsageDetail_20' ) start [2025-03-02 00:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587365', 'tblTempUsageDetail_20' ) end [2025-03-02 00:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587365', 'tblTempVendorCDR_20' ) start [2025-03-02 00:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587365', 'tblTempVendorCDR_20' ) end [2025-03-02 00:10:18] Production.INFO: ProcessCDR(1,14587365,1,1,2) [2025-03-02 00:10:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587365,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:10:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587365,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:10:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587365,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:10:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587365,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:10:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587365', 'tblTempUsageDetail_20' ) start [2025-03-02 00:10:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587365', 'tblTempUsageDetail_20' ) end [2025-03-02 00:10:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:10:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:10:21] Production.INFO: ==11536== Releasing lock... [2025-03-02 00:10:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:10:21] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 00:11:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:11:05 [end_date_ymd] => 2025-03-02 00:11:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:11:05' and `end` < '2025-03-02 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-03-02 00:11:17] Production.INFO: count ==336 [2025-03-02 00:11:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:11:05 - End Time 2025-03-02 00:11:05 [2025-03-02 00:11:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587370', 'tblTempUsageDetail_20' ) start [2025-03-02 00:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587370', 'tblTempUsageDetail_20' ) end [2025-03-02 00:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587370', 'tblTempVendorCDR_20' ) start [2025-03-02 00:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587370', 'tblTempVendorCDR_20' ) end [2025-03-02 00:11:17] Production.INFO: ProcessCDR(1,14587370,1,1,2) [2025-03-02 00:11:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587370,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:11:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587370,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:11:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587370,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:11:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587370,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:11:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587370', 'tblTempUsageDetail_20' ) start [2025-03-02 00:11:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587370', 'tblTempUsageDetail_20' ) end [2025-03-02 00:11:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:11:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:11:20] Production.INFO: ==11623== Releasing lock... [2025-03-02 00:11:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:11:20] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 00:12:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:12:05 [end_date_ymd] => 2025-03-02 00:12:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:12:05' and `end` < '2025-03-02 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-03-02 00:12:28] Production.INFO: count ==339 [2025-03-02 00:12:28] Production.ERROR: pbx CDR StartTime 2025-03-01 21:12:05 - End Time 2025-03-02 00:12:05 [2025-03-02 00:12:28] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:12:28] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587375', 'tblTempUsageDetail_20' ) start [2025-03-02 00:12:28] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587375', 'tblTempUsageDetail_20' ) end [2025-03-02 00:12:28] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587375', 'tblTempVendorCDR_20' ) start [2025-03-02 00:12:28] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587375', 'tblTempVendorCDR_20' ) end [2025-03-02 00:12:28] Production.INFO: ProcessCDR(1,14587375,1,1,2) [2025-03-02 00:12:28] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587375,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:12:29] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587375,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:12:29] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587375,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:12:32] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587375,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:12:32] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587375', 'tblTempUsageDetail_20' ) start [2025-03-02 00:12:32] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587375', 'tblTempUsageDetail_20' ) end [2025-03-02 00:12:32] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:12:32] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:12:32] Production.INFO: ==11702== Releasing lock... [2025-03-02 00:12:32] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:12:32] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 00:13:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:13:06 [end_date_ymd] => 2025-03-02 00:13:06 [RateCDR] => 1 ) [2025-03-02 00: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-03-01 21:13:06' and `end` < '2025-03-02 00: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-03-02 00:13:19] Production.INFO: count ==335 [2025-03-02 00:13:19] Production.ERROR: pbx CDR StartTime 2025-03-01 21:13:06 - End Time 2025-03-02 00:13:06 [2025-03-02 00:13:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:13:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587380', 'tblTempUsageDetail_20' ) start [2025-03-02 00:13:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587380', 'tblTempUsageDetail_20' ) end [2025-03-02 00:13:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587380', 'tblTempVendorCDR_20' ) start [2025-03-02 00:13:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587380', 'tblTempVendorCDR_20' ) end [2025-03-02 00:13:19] Production.INFO: ProcessCDR(1,14587380,1,1,2) [2025-03-02 00:13:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587380,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:13:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587380,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:13:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587380,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:13:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587380,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:13:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587380', 'tblTempUsageDetail_20' ) start [2025-03-02 00:13:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587380', 'tblTempUsageDetail_20' ) end [2025-03-02 00:13:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:13:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:13:22] Production.INFO: ==11780== Releasing lock... [2025-03-02 00:13:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:13:22] Production.INFO: 31 MB #Memory Used# [2025-03-02 00:14:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:14:05 [end_date_ymd] => 2025-03-02 00:14:05 [RateCDR] => 1 ) [2025-03-02 00: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-03-01 21:14:05' and `end` < '2025-03-02 00: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-03-02 00:14:17] Production.INFO: count ==334 [2025-03-02 00:14:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:14:05 - End Time 2025-03-02 00:14:05 [2025-03-02 00:14:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587385', 'tblTempUsageDetail_20' ) start [2025-03-02 00:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587385', 'tblTempUsageDetail_20' ) end [2025-03-02 00:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587385', 'tblTempVendorCDR_20' ) start [2025-03-02 00:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587385', 'tblTempVendorCDR_20' ) end [2025-03-02 00:14:17] Production.INFO: ProcessCDR(1,14587385,1,1,2) [2025-03-02 00:14:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587385,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:14:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587385,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:14:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587385,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:14:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587385,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:14:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587385', 'tblTempUsageDetail_20' ) start [2025-03-02 00:14:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587385', 'tblTempUsageDetail_20' ) end [2025-03-02 00:14:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:14:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:14:20] Production.INFO: ==11857== Releasing lock... [2025-03-02 00:14:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:14:20] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 00:15:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:15:05 [end_date_ymd] => 2025-03-02 00:15:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:15:05' and `end` < '2025-03-02 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-03-02 00:15:17] Production.INFO: count ==335 [2025-03-02 00:15:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:15:05 - End Time 2025-03-02 00:15:05 [2025-03-02 00:15:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587390', 'tblTempUsageDetail_20' ) start [2025-03-02 00:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587390', 'tblTempUsageDetail_20' ) end [2025-03-02 00:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587390', 'tblTempVendorCDR_20' ) start [2025-03-02 00:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587390', 'tblTempVendorCDR_20' ) end [2025-03-02 00:15:17] Production.INFO: ProcessCDR(1,14587390,1,1,2) [2025-03-02 00:15:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587390,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:15:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587390,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:15:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587390,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:15:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587390,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:15:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587390', 'tblTempUsageDetail_20' ) start [2025-03-02 00:15:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587390', 'tblTempUsageDetail_20' ) end [2025-03-02 00:15:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:15:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:15:22] Production.INFO: ==11934== Releasing lock... [2025-03-02 00:15:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:15:22] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 00:16:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:16:05 [end_date_ymd] => 2025-03-02 00:16:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:16:05' and `end` < '2025-03-02 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-03-02 00:16:17] Production.INFO: count ==333 [2025-03-02 00:16:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:16:05 - End Time 2025-03-02 00:16:05 [2025-03-02 00:16:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587395', 'tblTempUsageDetail_20' ) start [2025-03-02 00:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587395', 'tblTempUsageDetail_20' ) end [2025-03-02 00:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587395', 'tblTempVendorCDR_20' ) start [2025-03-02 00:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587395', 'tblTempVendorCDR_20' ) end [2025-03-02 00:16:17] Production.INFO: ProcessCDR(1,14587395,1,1,2) [2025-03-02 00:16:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587395,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:16:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587395,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:16:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587395,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:16:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587395,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587395', 'tblTempUsageDetail_20' ) start [2025-03-02 00:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587395', 'tblTempUsageDetail_20' ) end [2025-03-02 00:16:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:16:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:16:21] Production.INFO: ==12013== Releasing lock... [2025-03-02 00:16:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:16:21] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 00:17:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:17:05 [end_date_ymd] => 2025-03-02 00:17:05 [RateCDR] => 1 ) [2025-03-02 00: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-03-01 21:17:05' and `end` < '2025-03-02 00: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-03-02 00:17:17] Production.INFO: count ==336 [2025-03-02 00:17:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:17:05 - End Time 2025-03-02 00:17:05 [2025-03-02 00:17:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587400', 'tblTempUsageDetail_20' ) start [2025-03-02 00:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587400', 'tblTempUsageDetail_20' ) end [2025-03-02 00:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587400', 'tblTempVendorCDR_20' ) start [2025-03-02 00:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587400', 'tblTempVendorCDR_20' ) end [2025-03-02 00:17:17] Production.INFO: ProcessCDR(1,14587400,1,1,2) [2025-03-02 00:17:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587400,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:17:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587400,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:17:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587400,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:17:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587400,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:17:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587400', 'tblTempUsageDetail_20' ) start [2025-03-02 00:17:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587400', 'tblTempUsageDetail_20' ) end [2025-03-02 00:17:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:17:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:17:20] Production.INFO: ==12089== Releasing lock... [2025-03-02 00:17:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:17:20] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 00:18:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:18:06 [end_date_ymd] => 2025-03-02 00:18:06 [RateCDR] => 1 ) [2025-03-02 00: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-03-01 21:18:06' and `end` < '2025-03-02 00: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-03-02 00:18:18] Production.INFO: count ==333 [2025-03-02 00:18:18] Production.ERROR: pbx CDR StartTime 2025-03-01 21:18:06 - End Time 2025-03-02 00:18:06 [2025-03-02 00:18:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587405', 'tblTempUsageDetail_20' ) start [2025-03-02 00:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587405', 'tblTempUsageDetail_20' ) end [2025-03-02 00:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587405', 'tblTempVendorCDR_20' ) start [2025-03-02 00:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587405', 'tblTempVendorCDR_20' ) end [2025-03-02 00:18:18] Production.INFO: ProcessCDR(1,14587405,1,1,2) [2025-03-02 00:18:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587405,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:18:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587405,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:18:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587405,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:18:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587405,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:18:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587405', 'tblTempUsageDetail_20' ) start [2025-03-02 00:18:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587405', 'tblTempUsageDetail_20' ) end [2025-03-02 00:18:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:18:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:18:23] Production.INFO: ==12176== Releasing lock... [2025-03-02 00:18:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:18:23] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 00:19:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:19:05 [end_date_ymd] => 2025-03-02 00:19:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:19:05' and `end` < '2025-03-02 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-03-02 00:19:17] Production.INFO: count ==332 [2025-03-02 00:19:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:19:05 - End Time 2025-03-02 00:19:05 [2025-03-02 00:19:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587410', 'tblTempUsageDetail_20' ) start [2025-03-02 00:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587410', 'tblTempUsageDetail_20' ) end [2025-03-02 00:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587410', 'tblTempVendorCDR_20' ) start [2025-03-02 00:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587410', 'tblTempVendorCDR_20' ) end [2025-03-02 00:19:17] Production.INFO: ProcessCDR(1,14587410,1,1,2) [2025-03-02 00:19:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587410,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:19:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587410,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:19:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587410,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:19:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587410,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:19:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587410', 'tblTempUsageDetail_20' ) start [2025-03-02 00:19:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587410', 'tblTempUsageDetail_20' ) end [2025-03-02 00:19:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:19:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:19:21] Production.INFO: ==12252== Releasing lock... [2025-03-02 00:19:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:19:21] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 00:20:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:20:07 [end_date_ymd] => 2025-03-02 00:20:07 [RateCDR] => 1 ) [2025-03-02 00: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-03-01 21:20:07' and `end` < '2025-03-02 00: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-03-02 00:20:19] Production.INFO: count ==341 [2025-03-02 00:20:19] Production.ERROR: pbx CDR StartTime 2025-03-01 21:20:07 - End Time 2025-03-02 00:20:07 [2025-03-02 00:20:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:20:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587416', 'tblTempUsageDetail_20' ) start [2025-03-02 00:20:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587416', 'tblTempUsageDetail_20' ) end [2025-03-02 00:20:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587416', 'tblTempVendorCDR_20' ) start [2025-03-02 00:20:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587416', 'tblTempVendorCDR_20' ) end [2025-03-02 00:20:19] Production.INFO: ProcessCDR(1,14587416,1,1,2) [2025-03-02 00:20:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587416,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:20:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587416,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:20:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587416,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:20:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587416,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:20:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587416', 'tblTempUsageDetail_20' ) start [2025-03-02 00:20:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587416', 'tblTempUsageDetail_20' ) end [2025-03-02 00:20:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:20:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:20:24] Production.INFO: ==12349== Releasing lock... [2025-03-02 00:20:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:20:24] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 00:21:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:21:05 [end_date_ymd] => 2025-03-02 00:21:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:21:05' and `end` < '2025-03-02 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-03-02 00:21:17] Production.INFO: count ==362 [2025-03-02 00:21:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:21:05 - End Time 2025-03-02 00:21:05 [2025-03-02 00:21:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587421', 'tblTempUsageDetail_20' ) start [2025-03-02 00:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587421', 'tblTempUsageDetail_20' ) end [2025-03-02 00:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587421', 'tblTempVendorCDR_20' ) start [2025-03-02 00:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587421', 'tblTempVendorCDR_20' ) end [2025-03-02 00:21:17] Production.INFO: ProcessCDR(1,14587421,1,1,2) [2025-03-02 00:21:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587421,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:21:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587421,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:21:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587421,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:21:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587421,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:21:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587421', 'tblTempUsageDetail_20' ) start [2025-03-02 00:21:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587421', 'tblTempUsageDetail_20' ) end [2025-03-02 00:21:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:21:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:21:22] Production.INFO: ==12431== Releasing lock... [2025-03-02 00:21:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:21:22] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 00:22:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:22:05 [end_date_ymd] => 2025-03-02 00:22:05 [RateCDR] => 1 ) [2025-03-02 00: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-03-01 21:22:05' and `end` < '2025-03-02 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-03-02 00:22:17] Production.INFO: count ==360 [2025-03-02 00:22:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:22:05 - End Time 2025-03-02 00:22:05 [2025-03-02 00:22:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587426', 'tblTempUsageDetail_20' ) start [2025-03-02 00:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587426', 'tblTempUsageDetail_20' ) end [2025-03-02 00:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587426', 'tblTempVendorCDR_20' ) start [2025-03-02 00:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587426', 'tblTempVendorCDR_20' ) end [2025-03-02 00:22:18] Production.INFO: ProcessCDR(1,14587426,1,1,2) [2025-03-02 00:22:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587426,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:22:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587426,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:22:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587426,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:22:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587426,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587426', 'tblTempUsageDetail_20' ) start [2025-03-02 00:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587426', 'tblTempUsageDetail_20' ) end [2025-03-02 00:22:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:22:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:22:21] Production.INFO: ==12511== Releasing lock... [2025-03-02 00:22:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:22:21] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 00:23:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:23:05 [end_date_ymd] => 2025-03-02 00:23:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:23:05' and `end` < '2025-03-02 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-03-02 00:23:17] Production.INFO: count ==363 [2025-03-02 00:23:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:23:05 - End Time 2025-03-02 00:23:05 [2025-03-02 00:23:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587431', 'tblTempUsageDetail_20' ) start [2025-03-02 00:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587431', 'tblTempUsageDetail_20' ) end [2025-03-02 00:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587431', 'tblTempVendorCDR_20' ) start [2025-03-02 00:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587431', 'tblTempVendorCDR_20' ) end [2025-03-02 00:23:17] Production.INFO: ProcessCDR(1,14587431,1,1,2) [2025-03-02 00:23:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587431,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:23:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587431,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:23:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587431,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:23:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587431,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:23:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587431', 'tblTempUsageDetail_20' ) start [2025-03-02 00:23:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587431', 'tblTempUsageDetail_20' ) end [2025-03-02 00:23:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:23:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:23:22] Production.INFO: ==12600== Releasing lock... [2025-03-02 00:23:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:23:22] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 00:24:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:24:06 [end_date_ymd] => 2025-03-02 00:24:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:24:06' and `end` < '2025-03-02 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-03-02 00:24:18] Production.INFO: count ==367 [2025-03-02 00:24:18] Production.ERROR: pbx CDR StartTime 2025-03-01 21:24:06 - End Time 2025-03-02 00:24:06 [2025-03-02 00:24:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587436', 'tblTempUsageDetail_20' ) start [2025-03-02 00:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587436', 'tblTempUsageDetail_20' ) end [2025-03-02 00:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587436', 'tblTempVendorCDR_20' ) start [2025-03-02 00:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587436', 'tblTempVendorCDR_20' ) end [2025-03-02 00:24:18] Production.INFO: ProcessCDR(1,14587436,1,1,2) [2025-03-02 00:24:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587436,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:24:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587436,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:24:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587436,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:24:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587436,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587436', 'tblTempUsageDetail_20' ) start [2025-03-02 00:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587436', 'tblTempUsageDetail_20' ) end [2025-03-02 00:24:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:24:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:24:21] Production.INFO: ==12721== Releasing lock... [2025-03-02 00:24:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:24:21] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 00:25:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:25:05 [end_date_ymd] => 2025-03-02 00:25:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:25:05' and `end` < '2025-03-02 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-03-02 00:25:17] Production.INFO: count ==367 [2025-03-02 00:25:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:25:05 - End Time 2025-03-02 00:25:05 [2025-03-02 00:25:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587441', 'tblTempUsageDetail_20' ) start [2025-03-02 00:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587441', 'tblTempUsageDetail_20' ) end [2025-03-02 00:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587441', 'tblTempVendorCDR_20' ) start [2025-03-02 00:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587441', 'tblTempVendorCDR_20' ) end [2025-03-02 00:25:17] Production.INFO: ProcessCDR(1,14587441,1,1,2) [2025-03-02 00:25:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587441,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:25:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587441,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:25:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587441,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:25:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587441,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587441', 'tblTempUsageDetail_20' ) start [2025-03-02 00:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587441', 'tblTempUsageDetail_20' ) end [2025-03-02 00:25:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:25:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:25:21] Production.INFO: ==12811== Releasing lock... [2025-03-02 00:25:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:25:21] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 00:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:26:05 [end_date_ymd] => 2025-03-02 00:26:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:26:05' and `end` < '2025-03-02 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-03-02 00:26:17] Production.INFO: count ==364 [2025-03-02 00:26:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:26:05 - End Time 2025-03-02 00:26:05 [2025-03-02 00:26:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587446', 'tblTempUsageDetail_20' ) start [2025-03-02 00:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587446', 'tblTempUsageDetail_20' ) end [2025-03-02 00:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587446', 'tblTempVendorCDR_20' ) start [2025-03-02 00:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587446', 'tblTempVendorCDR_20' ) end [2025-03-02 00:26:17] Production.INFO: ProcessCDR(1,14587446,1,1,2) [2025-03-02 00:26:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587446,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:26:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587446,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:26:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587446,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:26:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587446,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:26:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587446', 'tblTempUsageDetail_20' ) start [2025-03-02 00:26:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587446', 'tblTempUsageDetail_20' ) end [2025-03-02 00:26:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:26:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:26:21] Production.INFO: ==12892== Releasing lock... [2025-03-02 00:26:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:26:21] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 00:27:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:27:05 [end_date_ymd] => 2025-03-02 00:27:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:27:05' and `end` < '2025-03-02 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-03-02 00:27:17] Production.INFO: count ==364 [2025-03-02 00:27:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:27:05 - End Time 2025-03-02 00:27:05 [2025-03-02 00:27:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587451', 'tblTempUsageDetail_20' ) start [2025-03-02 00:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587451', 'tblTempUsageDetail_20' ) end [2025-03-02 00:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587451', 'tblTempVendorCDR_20' ) start [2025-03-02 00:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587451', 'tblTempVendorCDR_20' ) end [2025-03-02 00:27:17] Production.INFO: ProcessCDR(1,14587451,1,1,2) [2025-03-02 00:27:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587451,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:27:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587451,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:27:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587451,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:27:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587451,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:27:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587451', 'tblTempUsageDetail_20' ) start [2025-03-02 00:27:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587451', 'tblTempUsageDetail_20' ) end [2025-03-02 00:27:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:27:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:27:20] Production.INFO: ==12985== Releasing lock... [2025-03-02 00:27:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:27:20] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 00:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:28:05 [end_date_ymd] => 2025-03-02 00:28:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:28:05' and `end` < '2025-03-02 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-03-02 00:28:17] Production.INFO: count ==365 [2025-03-02 00:28:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:28:05 - End Time 2025-03-02 00:28:05 [2025-03-02 00:28:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587456', 'tblTempUsageDetail_20' ) start [2025-03-02 00:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587456', 'tblTempUsageDetail_20' ) end [2025-03-02 00:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587456', 'tblTempVendorCDR_20' ) start [2025-03-02 00:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587456', 'tblTempVendorCDR_20' ) end [2025-03-02 00:28:17] Production.INFO: ProcessCDR(1,14587456,1,1,2) [2025-03-02 00:28:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587456,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:28:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587456,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:28:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587456,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:28:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587456,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:28:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587456', 'tblTempUsageDetail_20' ) start [2025-03-02 00:28:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587456', 'tblTempUsageDetail_20' ) end [2025-03-02 00:28:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:28:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:28:22] Production.INFO: ==13078== Releasing lock... [2025-03-02 00:28:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:28:22] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 00:29:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:29:05 [end_date_ymd] => 2025-03-02 00:29:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:29:05' and `end` < '2025-03-02 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-03-02 00:29:17] Production.INFO: count ==365 [2025-03-02 00:29:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:29:05 - End Time 2025-03-02 00:29:05 [2025-03-02 00:29:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587461', 'tblTempUsageDetail_20' ) start [2025-03-02 00:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587461', 'tblTempUsageDetail_20' ) end [2025-03-02 00:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587461', 'tblTempVendorCDR_20' ) start [2025-03-02 00:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587461', 'tblTempVendorCDR_20' ) end [2025-03-02 00:29:17] Production.INFO: ProcessCDR(1,14587461,1,1,2) [2025-03-02 00:29:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587461,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:29:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587461,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:29:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587461,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:29:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587461,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:29:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587461', 'tblTempUsageDetail_20' ) start [2025-03-02 00:29:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587461', 'tblTempUsageDetail_20' ) end [2025-03-02 00:29:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:29:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:29:21] Production.INFO: ==13171== Releasing lock... [2025-03-02 00:29:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:29:21] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 00:30:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:30:06 [end_date_ymd] => 2025-03-02 00:30:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:30:06' and `end` < '2025-03-02 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-03-02 00:30:18] Production.INFO: count ==376 [2025-03-02 00:30:18] Production.ERROR: pbx CDR StartTime 2025-03-01 21:30:06 - End Time 2025-03-02 00:30:06 [2025-03-02 00:30:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587467', 'tblTempUsageDetail_20' ) start [2025-03-02 00:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587467', 'tblTempUsageDetail_20' ) end [2025-03-02 00:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587467', 'tblTempVendorCDR_20' ) start [2025-03-02 00:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587467', 'tblTempVendorCDR_20' ) end [2025-03-02 00:30:18] Production.INFO: ProcessCDR(1,14587467,1,1,2) [2025-03-02 00:30:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587467,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:30:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587467,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:30:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587467,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:30:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587467,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:30:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587467', 'tblTempUsageDetail_20' ) start [2025-03-02 00:30:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587467', 'tblTempUsageDetail_20' ) end [2025-03-02 00:30:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:30:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:30:22] Production.INFO: ==13269== Releasing lock... [2025-03-02 00:30:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:30:22] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 00:31:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:31:04 [end_date_ymd] => 2025-03-02 00:31:04 [RateCDR] => 1 ) [2025-03-02 00:31: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-03-01 21:31:04' and `end` < '2025-03-02 00:31: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-03-02 00:31:16] Production.INFO: count ==390 [2025-03-02 00:31:16] Production.ERROR: pbx CDR StartTime 2025-03-01 21:31:04 - End Time 2025-03-02 00:31:04 [2025-03-02 00:31:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587472', 'tblTempUsageDetail_20' ) start [2025-03-02 00:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587472', 'tblTempUsageDetail_20' ) end [2025-03-02 00:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587472', 'tblTempVendorCDR_20' ) start [2025-03-02 00:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587472', 'tblTempVendorCDR_20' ) end [2025-03-02 00:31:16] Production.INFO: ProcessCDR(1,14587472,1,1,2) [2025-03-02 00:31:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587472,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:31:17] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587472,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:31:17] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587472,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:31:19] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587472,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:31:19] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587472', 'tblTempUsageDetail_20' ) start [2025-03-02 00:31:19] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587472', 'tblTempUsageDetail_20' ) end [2025-03-02 00:31:19] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:31:19] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:31:19] Production.INFO: ==13369== Releasing lock... [2025-03-02 00:31:19] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:31:19] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 00:32:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:32:06 [end_date_ymd] => 2025-03-02 00:32:06 [RateCDR] => 1 ) [2025-03-02 00: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-03-01 21:32:06' and `end` < '2025-03-02 00: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-03-02 00:32:18] Production.INFO: count ==390 [2025-03-02 00:32:18] Production.ERROR: pbx CDR StartTime 2025-03-01 21:32:06 - End Time 2025-03-02 00:32:06 [2025-03-02 00:32:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:32:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587477', 'tblTempUsageDetail_20' ) start [2025-03-02 00:32:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587477', 'tblTempUsageDetail_20' ) end [2025-03-02 00:32:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587477', 'tblTempVendorCDR_20' ) start [2025-03-02 00:32:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587477', 'tblTempVendorCDR_20' ) end [2025-03-02 00:32:18] Production.INFO: ProcessCDR(1,14587477,1,1,2) [2025-03-02 00:32:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587477,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:32:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587477,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:32:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587477,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:32:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587477,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:32:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587477', 'tblTempUsageDetail_20' ) start [2025-03-02 00:32:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587477', 'tblTempUsageDetail_20' ) end [2025-03-02 00:32:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:32:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:32:21] Production.INFO: ==13459== Releasing lock... [2025-03-02 00:32:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:32:21] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 00:33:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:33:05 [end_date_ymd] => 2025-03-02 00:33:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:33:05' and `end` < '2025-03-02 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-03-02 00:33:17] Production.INFO: count ==379 [2025-03-02 00:33:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:33:05 - End Time 2025-03-02 00:33:05 [2025-03-02 00:33:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587482', 'tblTempUsageDetail_20' ) start [2025-03-02 00:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587482', 'tblTempUsageDetail_20' ) end [2025-03-02 00:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587482', 'tblTempVendorCDR_20' ) start [2025-03-02 00:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587482', 'tblTempVendorCDR_20' ) end [2025-03-02 00:33:17] Production.INFO: ProcessCDR(1,14587482,1,1,2) [2025-03-02 00:33:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587482,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:33:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587482,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:33:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587482,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:33:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587482,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:33:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587482', 'tblTempUsageDetail_20' ) start [2025-03-02 00:33:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587482', 'tblTempUsageDetail_20' ) end [2025-03-02 00:33:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:33:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:33:20] Production.INFO: ==13552== Releasing lock... [2025-03-02 00:33:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:33:20] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 00:34:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:34:05 [end_date_ymd] => 2025-03-02 00:34:05 [RateCDR] => 1 ) [2025-03-02 00: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-03-01 21:34:05' and `end` < '2025-03-02 00: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-03-02 00:34:16] Production.INFO: count ==371 [2025-03-02 00:34:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:34:05 - End Time 2025-03-02 00:34:05 [2025-03-02 00:34:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587487', 'tblTempUsageDetail_20' ) start [2025-03-02 00:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587487', 'tblTempUsageDetail_20' ) end [2025-03-02 00:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587487', 'tblTempVendorCDR_20' ) start [2025-03-02 00:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587487', 'tblTempVendorCDR_20' ) end [2025-03-02 00:34:17] Production.INFO: ProcessCDR(1,14587487,1,1,2) [2025-03-02 00:34:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587487,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:34:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587487,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:34:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587487,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:34:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587487,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:34:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587487', 'tblTempUsageDetail_20' ) start [2025-03-02 00:34:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587487', 'tblTempUsageDetail_20' ) end [2025-03-02 00:34:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:34:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:34:20] Production.INFO: ==13649== Releasing lock... [2025-03-02 00:34:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:34:20] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 00:35:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:35:06 [end_date_ymd] => 2025-03-02 00:35:06 [RateCDR] => 1 ) [2025-03-02 00: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-03-01 21:35:06' and `end` < '2025-03-02 00: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-03-02 00:35:18] Production.INFO: count ==371 [2025-03-02 00:35:18] Production.ERROR: pbx CDR StartTime 2025-03-01 21:35:06 - End Time 2025-03-02 00:35:06 [2025-03-02 00:35:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587492', 'tblTempUsageDetail_20' ) start [2025-03-02 00:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587492', 'tblTempUsageDetail_20' ) end [2025-03-02 00:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587492', 'tblTempVendorCDR_20' ) start [2025-03-02 00:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587492', 'tblTempVendorCDR_20' ) end [2025-03-02 00:35:18] Production.INFO: ProcessCDR(1,14587492,1,1,2) [2025-03-02 00:35:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587492,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:35:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587492,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:35:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587492,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:35:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587492,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:35:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587492', 'tblTempUsageDetail_20' ) start [2025-03-02 00:35:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587492', 'tblTempUsageDetail_20' ) end [2025-03-02 00:35:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:35:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:35:21] Production.INFO: ==13747== Releasing lock... [2025-03-02 00:35:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:35:21] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 00:36:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:36:05 [end_date_ymd] => 2025-03-02 00:36:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:36:05' and `end` < '2025-03-02 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-03-02 00:36:17] Production.INFO: count ==366 [2025-03-02 00:36:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:36:05 - End Time 2025-03-02 00:36:05 [2025-03-02 00:36:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587497', 'tblTempUsageDetail_20' ) start [2025-03-02 00:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587497', 'tblTempUsageDetail_20' ) end [2025-03-02 00:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587497', 'tblTempVendorCDR_20' ) start [2025-03-02 00:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587497', 'tblTempVendorCDR_20' ) end [2025-03-02 00:36:17] Production.INFO: ProcessCDR(1,14587497,1,1,2) [2025-03-02 00:36:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587497,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:36:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587497,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:36:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587497,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:36:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587497,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:36:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587497', 'tblTempUsageDetail_20' ) start [2025-03-02 00:36:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587497', 'tblTempUsageDetail_20' ) end [2025-03-02 00:36:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:36:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:36:21] Production.INFO: ==13850== Releasing lock... [2025-03-02 00:36:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:36:21] Production.INFO: 31 MB #Memory Used# [2025-03-02 00:37:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:37:05 [end_date_ymd] => 2025-03-02 00:37:05 [RateCDR] => 1 ) [2025-03-02 00: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-03-01 21:37:05' and `end` < '2025-03-02 00: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-03-02 00:37:17] Production.INFO: count ==361 [2025-03-02 00:37:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:37:05 - End Time 2025-03-02 00:37:05 [2025-03-02 00:37:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587502', 'tblTempUsageDetail_20' ) start [2025-03-02 00:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587502', 'tblTempUsageDetail_20' ) end [2025-03-02 00:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587502', 'tblTempVendorCDR_20' ) start [2025-03-02 00:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587502', 'tblTempVendorCDR_20' ) end [2025-03-02 00:37:18] Production.INFO: ProcessCDR(1,14587502,1,1,2) [2025-03-02 00:37:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587502,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:37:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587502,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:37:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587502,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:37:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587502,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587502', 'tblTempUsageDetail_20' ) start [2025-03-02 00:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587502', 'tblTempUsageDetail_20' ) end [2025-03-02 00:37:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:37:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:37:21] Production.INFO: ==13934== Releasing lock... [2025-03-02 00:37:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:37:21] Production.INFO: 31 MB #Memory Used# [2025-03-02 00:38:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:38:05 [end_date_ymd] => 2025-03-02 00:38:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:38:05' and `end` < '2025-03-02 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-03-02 00:38:17] Production.INFO: count ==361 [2025-03-02 00:38:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:38:05 - End Time 2025-03-02 00:38:05 [2025-03-02 00:38:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587507', 'tblTempUsageDetail_20' ) start [2025-03-02 00:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587507', 'tblTempUsageDetail_20' ) end [2025-03-02 00:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587507', 'tblTempVendorCDR_20' ) start [2025-03-02 00:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587507', 'tblTempVendorCDR_20' ) end [2025-03-02 00:38:17] Production.INFO: ProcessCDR(1,14587507,1,1,2) [2025-03-02 00:38:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587507,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:38:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587507,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:38:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587507,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:38:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587507,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587507', 'tblTempUsageDetail_20' ) start [2025-03-02 00:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587507', 'tblTempUsageDetail_20' ) end [2025-03-02 00:38:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:38:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:38:21] Production.INFO: ==14026== Releasing lock... [2025-03-02 00:38:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:38:21] Production.INFO: 31 MB #Memory Used# [2025-03-02 00:39:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:39:06 [end_date_ymd] => 2025-03-02 00:39:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:39:06' and `end` < '2025-03-02 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-03-02 00:39:18] Production.INFO: count ==361 [2025-03-02 00:39:18] Production.ERROR: pbx CDR StartTime 2025-03-01 21:39:06 - End Time 2025-03-02 00:39:06 [2025-03-02 00:39:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587512', 'tblTempUsageDetail_20' ) start [2025-03-02 00:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587512', 'tblTempUsageDetail_20' ) end [2025-03-02 00:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587512', 'tblTempVendorCDR_20' ) start [2025-03-02 00:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587512', 'tblTempVendorCDR_20' ) end [2025-03-02 00:39:18] Production.INFO: ProcessCDR(1,14587512,1,1,2) [2025-03-02 00:39:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587512,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:39:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587512,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:39:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587512,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:39:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587512,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:39:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587512', 'tblTempUsageDetail_20' ) start [2025-03-02 00:39:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587512', 'tblTempUsageDetail_20' ) end [2025-03-02 00:39:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:39:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:39:21] Production.INFO: ==14161== Releasing lock... [2025-03-02 00:39:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:39:21] Production.INFO: 31 MB #Memory Used# [2025-03-02 00:40:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:40:06 [end_date_ymd] => 2025-03-02 00:40:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:40:06' and `end` < '2025-03-02 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-03-02 00:40:18] Production.INFO: count ==361 [2025-03-02 00:40:18] Production.ERROR: pbx CDR StartTime 2025-03-01 21:40:06 - End Time 2025-03-02 00:40:06 [2025-03-02 00:40:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587518', 'tblTempUsageDetail_20' ) start [2025-03-02 00:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587518', 'tblTempUsageDetail_20' ) end [2025-03-02 00:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587518', 'tblTempVendorCDR_20' ) start [2025-03-02 00:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587518', 'tblTempVendorCDR_20' ) end [2025-03-02 00:40:18] Production.INFO: ProcessCDR(1,14587518,1,1,2) [2025-03-02 00:40:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587518,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:40:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587518,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:40:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587518,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:40:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587518,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:40:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587518', 'tblTempUsageDetail_20' ) start [2025-03-02 00:40:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587518', 'tblTempUsageDetail_20' ) end [2025-03-02 00:40:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:40:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:40:22] Production.INFO: ==14264== Releasing lock... [2025-03-02 00:40:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:40:22] Production.INFO: 31 MB #Memory Used# [2025-03-02 00:41:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:41:05 [end_date_ymd] => 2025-03-02 00:41:05 [RateCDR] => 1 ) [2025-03-02 00: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-03-01 21:41:05' and `end` < '2025-03-02 00: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-03-02 00:41:17] Production.INFO: count ==373 [2025-03-02 00:41:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:41:05 - End Time 2025-03-02 00:41:05 [2025-03-02 00:41:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587523', 'tblTempUsageDetail_20' ) start [2025-03-02 00:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587523', 'tblTempUsageDetail_20' ) end [2025-03-02 00:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587523', 'tblTempVendorCDR_20' ) start [2025-03-02 00:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587523', 'tblTempVendorCDR_20' ) end [2025-03-02 00:41:17] Production.INFO: ProcessCDR(1,14587523,1,1,2) [2025-03-02 00:41:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587523,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:41:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587523,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:41:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587523,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:41:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587523,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:41:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587523', 'tblTempUsageDetail_20' ) start [2025-03-02 00:41:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587523', 'tblTempUsageDetail_20' ) end [2025-03-02 00:41:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:41:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:41:21] Production.INFO: ==14362== Releasing lock... [2025-03-02 00:41:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:41:21] Production.INFO: 31 MB #Memory Used# [2025-03-02 00:42:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:42:05 [end_date_ymd] => 2025-03-02 00:42:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:42:05' and `end` < '2025-03-02 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-03-02 00:42:17] Production.INFO: count ==373 [2025-03-02 00:42:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:42:05 - End Time 2025-03-02 00:42:05 [2025-03-02 00:42:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587528', 'tblTempUsageDetail_20' ) start [2025-03-02 00:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587528', 'tblTempUsageDetail_20' ) end [2025-03-02 00:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587528', 'tblTempVendorCDR_20' ) start [2025-03-02 00:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587528', 'tblTempVendorCDR_20' ) end [2025-03-02 00:42:17] Production.INFO: ProcessCDR(1,14587528,1,1,2) [2025-03-02 00:42:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587528,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:42:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587528,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:42:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587528,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:42:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587528,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:42:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587528', 'tblTempUsageDetail_20' ) start [2025-03-02 00:42:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587528', 'tblTempUsageDetail_20' ) end [2025-03-02 00:42:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:42:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:42:20] Production.INFO: ==14458== Releasing lock... [2025-03-02 00:42:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:42:20] Production.INFO: 31 MB #Memory Used# [2025-03-02 00:43:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:43:06 [end_date_ymd] => 2025-03-02 00:43:06 [RateCDR] => 1 ) [2025-03-02 00: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-03-01 21:43:06' and `end` < '2025-03-02 00: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-03-02 00:43:18] Production.INFO: count ==372 [2025-03-02 00:43:18] Production.ERROR: pbx CDR StartTime 2025-03-01 21:43:06 - End Time 2025-03-02 00:43:06 [2025-03-02 00:43:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587533', 'tblTempUsageDetail_20' ) start [2025-03-02 00:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587533', 'tblTempUsageDetail_20' ) end [2025-03-02 00:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587533', 'tblTempVendorCDR_20' ) start [2025-03-02 00:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587533', 'tblTempVendorCDR_20' ) end [2025-03-02 00:43:18] Production.INFO: ProcessCDR(1,14587533,1,1,2) [2025-03-02 00:43:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587533,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:43:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587533,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:43:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587533,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:43:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587533,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:43:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587533', 'tblTempUsageDetail_20' ) start [2025-03-02 00:43:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587533', 'tblTempUsageDetail_20' ) end [2025-03-02 00:43:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:43:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:43:21] Production.INFO: ==14552== Releasing lock... [2025-03-02 00:43:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:43:21] Production.INFO: 30.75 MB #Memory Used# [2025-03-02 00:44:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:44:05 [end_date_ymd] => 2025-03-02 00:44:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:44:05' and `end` < '2025-03-02 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-03-02 00:44:17] Production.INFO: count ==372 [2025-03-02 00:44:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:44:05 - End Time 2025-03-02 00:44:05 [2025-03-02 00:44:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587538', 'tblTempUsageDetail_20' ) start [2025-03-02 00:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587538', 'tblTempUsageDetail_20' ) end [2025-03-02 00:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587538', 'tblTempVendorCDR_20' ) start [2025-03-02 00:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587538', 'tblTempVendorCDR_20' ) end [2025-03-02 00:44:17] Production.INFO: ProcessCDR(1,14587538,1,1,2) [2025-03-02 00:44:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587538,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:44:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587538,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:44:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587538,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:44:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587538,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:44:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587538', 'tblTempUsageDetail_20' ) start [2025-03-02 00:44:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587538', 'tblTempUsageDetail_20' ) end [2025-03-02 00:44:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:44:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:44:20] Production.INFO: ==14646== Releasing lock... [2025-03-02 00:44:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:44:20] Production.INFO: 30.75 MB #Memory Used# [2025-03-02 00:45:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:45:05 [end_date_ymd] => 2025-03-02 00:45:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:45:05' and `end` < '2025-03-02 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-03-02 00:45:17] Production.INFO: count ==375 [2025-03-02 00:45:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:45:05 - End Time 2025-03-02 00:45:05 [2025-03-02 00:45:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587543', 'tblTempUsageDetail_20' ) start [2025-03-02 00:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587543', 'tblTempUsageDetail_20' ) end [2025-03-02 00:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587543', 'tblTempVendorCDR_20' ) start [2025-03-02 00:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587543', 'tblTempVendorCDR_20' ) end [2025-03-02 00:45:17] Production.INFO: ProcessCDR(1,14587543,1,1,2) [2025-03-02 00:45:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587543,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:45:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587543,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:45:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587543,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:45:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587543,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:45:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587543', 'tblTempUsageDetail_20' ) start [2025-03-02 00:45:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587543', 'tblTempUsageDetail_20' ) end [2025-03-02 00:45:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:45:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:45:21] Production.INFO: ==14735== Releasing lock... [2025-03-02 00:45:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:45:21] Production.INFO: 31 MB #Memory Used# [2025-03-02 00:46:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:46:05 [end_date_ymd] => 2025-03-02 00:46:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:46:05' and `end` < '2025-03-02 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-03-02 00:46:17] Production.INFO: count ==376 [2025-03-02 00:46:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:46:05 - End Time 2025-03-02 00:46:05 [2025-03-02 00:46:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587548', 'tblTempUsageDetail_20' ) start [2025-03-02 00:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587548', 'tblTempUsageDetail_20' ) end [2025-03-02 00:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587548', 'tblTempVendorCDR_20' ) start [2025-03-02 00:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587548', 'tblTempVendorCDR_20' ) end [2025-03-02 00:46:17] Production.INFO: ProcessCDR(1,14587548,1,1,2) [2025-03-02 00:46:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587548,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:46:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587548,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:46:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587548,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:46:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587548,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:46:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587548', 'tblTempUsageDetail_20' ) start [2025-03-02 00:46:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587548', 'tblTempUsageDetail_20' ) end [2025-03-02 00:46:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:46:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:46:22] Production.INFO: ==14826== Releasing lock... [2025-03-02 00:46:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:46:22] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 00:47:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:47:06 [end_date_ymd] => 2025-03-02 00:47:06 [RateCDR] => 1 ) [2025-03-02 00: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-03-01 21:47:06' and `end` < '2025-03-02 00: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-03-02 00:47:18] Production.INFO: count ==376 [2025-03-02 00:47:18] Production.ERROR: pbx CDR StartTime 2025-03-01 21:47:06 - End Time 2025-03-02 00:47:06 [2025-03-02 00:47:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587553', 'tblTempUsageDetail_20' ) start [2025-03-02 00:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587553', 'tblTempUsageDetail_20' ) end [2025-03-02 00:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587553', 'tblTempVendorCDR_20' ) start [2025-03-02 00:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587553', 'tblTempVendorCDR_20' ) end [2025-03-02 00:47:18] Production.INFO: ProcessCDR(1,14587553,1,1,2) [2025-03-02 00:47:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587553,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:47:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587553,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:47:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587553,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:47:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587553,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:47:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587553', 'tblTempUsageDetail_20' ) start [2025-03-02 00:47:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587553', 'tblTempUsageDetail_20' ) end [2025-03-02 00:47:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:47:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:47:23] Production.INFO: ==14926== Releasing lock... [2025-03-02 00:47:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:47:23] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 00:48:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:48:05 [end_date_ymd] => 2025-03-02 00:48:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:48:05' and `end` < '2025-03-02 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-03-02 00:48:17] Production.INFO: count ==380 [2025-03-02 00:48:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:48:05 - End Time 2025-03-02 00:48:05 [2025-03-02 00:48:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587558', 'tblTempUsageDetail_20' ) start [2025-03-02 00:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587558', 'tblTempUsageDetail_20' ) end [2025-03-02 00:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587558', 'tblTempVendorCDR_20' ) start [2025-03-02 00:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587558', 'tblTempVendorCDR_20' ) end [2025-03-02 00:48:17] Production.INFO: ProcessCDR(1,14587558,1,1,2) [2025-03-02 00:48:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587558,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:48:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587558,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:48:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587558,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:48:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587558,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:48:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587558', 'tblTempUsageDetail_20' ) start [2025-03-02 00:48:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587558', 'tblTempUsageDetail_20' ) end [2025-03-02 00:48:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:48:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:48:22] Production.INFO: ==15013== Releasing lock... [2025-03-02 00:48:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:48:22] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 00:49:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:49:05 [end_date_ymd] => 2025-03-02 00:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:49:05' and `end` < '2025-03-02 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-03-02 00:49:17] Production.INFO: count ==376 [2025-03-02 00:49:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:49:05 - End Time 2025-03-02 00:49:05 [2025-03-02 00:49:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587563', 'tblTempUsageDetail_20' ) start [2025-03-02 00:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587563', 'tblTempUsageDetail_20' ) end [2025-03-02 00:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587563', 'tblTempVendorCDR_20' ) start [2025-03-02 00:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587563', 'tblTempVendorCDR_20' ) end [2025-03-02 00:49:17] Production.INFO: ProcessCDR(1,14587563,1,1,2) [2025-03-02 00:49:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587563,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:49:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587563,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:49:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587563,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:49:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587563,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:49:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587563', 'tblTempUsageDetail_20' ) start [2025-03-02 00:49:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587563', 'tblTempUsageDetail_20' ) end [2025-03-02 00:49:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:49:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:49:21] Production.INFO: ==15109== Releasing lock... [2025-03-02 00:49:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:49:21] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 00:50:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:50:07 [end_date_ymd] => 2025-03-02 00:50:07 [RateCDR] => 1 ) [2025-03-02 00: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-03-01 21:50:07' and `end` < '2025-03-02 00: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-03-02 00:50:19] Production.INFO: count ==383 [2025-03-02 00:50:19] Production.ERROR: pbx CDR StartTime 2025-03-01 21:50:07 - End Time 2025-03-02 00:50:07 [2025-03-02 00:50:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587569', 'tblTempUsageDetail_20' ) start [2025-03-02 00:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587569', 'tblTempUsageDetail_20' ) end [2025-03-02 00:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587569', 'tblTempVendorCDR_20' ) start [2025-03-02 00:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587569', 'tblTempVendorCDR_20' ) end [2025-03-02 00:50:19] Production.INFO: ProcessCDR(1,14587569,1,1,2) [2025-03-02 00:50:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587569,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:50:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587569,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:50:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587569,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:50:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587569,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:50:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587569', 'tblTempUsageDetail_20' ) start [2025-03-02 00:50:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587569', 'tblTempUsageDetail_20' ) end [2025-03-02 00:50:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:50:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:50:24] Production.INFO: ==15200== Releasing lock... [2025-03-02 00:50:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:50:24] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 00:51:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:51:05 [end_date_ymd] => 2025-03-02 00:51:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:51:05' and `end` < '2025-03-02 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-03-02 00:51:17] Production.INFO: count ==413 [2025-03-02 00:51:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:51:05 - End Time 2025-03-02 00:51:05 [2025-03-02 00:51:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587574', 'tblTempUsageDetail_20' ) start [2025-03-02 00:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587574', 'tblTempUsageDetail_20' ) end [2025-03-02 00:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587574', 'tblTempVendorCDR_20' ) start [2025-03-02 00:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587574', 'tblTempVendorCDR_20' ) end [2025-03-02 00:51:17] Production.INFO: ProcessCDR(1,14587574,1,1,2) [2025-03-02 00:51:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587574,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:51:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587574,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:51:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587574,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:51:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587574,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:51:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587574', 'tblTempUsageDetail_20' ) start [2025-03-02 00:51:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587574', 'tblTempUsageDetail_20' ) end [2025-03-02 00:51:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:51:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:51:21] Production.INFO: ==15300== Releasing lock... [2025-03-02 00:51:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:51:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 00:52:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:52:06 [end_date_ymd] => 2025-03-02 00:52:06 [RateCDR] => 1 ) [2025-03-02 00: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-03-01 21:52:06' and `end` < '2025-03-02 00: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-03-02 00:52:18] Production.INFO: count ==417 [2025-03-02 00:52:18] Production.ERROR: pbx CDR StartTime 2025-03-01 21:52:06 - End Time 2025-03-02 00:52:06 [2025-03-02 00:52:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587579', 'tblTempUsageDetail_20' ) start [2025-03-02 00:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587579', 'tblTempUsageDetail_20' ) end [2025-03-02 00:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587579', 'tblTempVendorCDR_20' ) start [2025-03-02 00:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587579', 'tblTempVendorCDR_20' ) end [2025-03-02 00:52:18] Production.INFO: ProcessCDR(1,14587579,1,1,2) [2025-03-02 00:52:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587579,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:52:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587579,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:52:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587579,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:52:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587579,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:52:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587579', 'tblTempUsageDetail_20' ) start [2025-03-02 00:52:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587579', 'tblTempUsageDetail_20' ) end [2025-03-02 00:52:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:52:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:52:21] Production.INFO: ==15398== Releasing lock... [2025-03-02 00:52:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:52:21] Production.INFO: 32 MB #Memory Used# [2025-03-02 00:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:53:05 [end_date_ymd] => 2025-03-02 00:53:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:53:05' and `end` < '2025-03-02 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-03-02 00:53:17] Production.INFO: count ==424 [2025-03-02 00:53:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:53:05 - End Time 2025-03-02 00:53:05 [2025-03-02 00:53:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587584', 'tblTempUsageDetail_20' ) start [2025-03-02 00:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587584', 'tblTempUsageDetail_20' ) end [2025-03-02 00:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587584', 'tblTempVendorCDR_20' ) start [2025-03-02 00:53:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587584', 'tblTempVendorCDR_20' ) end [2025-03-02 00:53:18] Production.INFO: ProcessCDR(1,14587584,1,1,2) [2025-03-02 00:53:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587584,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:53:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587584,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:53:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587584,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:53:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587584,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587584', 'tblTempUsageDetail_20' ) start [2025-03-02 00:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587584', 'tblTempUsageDetail_20' ) end [2025-03-02 00:53:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:53:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:53:21] Production.INFO: ==15493== Releasing lock... [2025-03-02 00:53:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:53:21] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 00:54:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:54:05 [end_date_ymd] => 2025-03-02 00:54:05 [RateCDR] => 1 ) [2025-03-02 00: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-03-01 21:54:05' and `end` < '2025-03-02 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-03-02 00:54:17] Production.INFO: count ==427 [2025-03-02 00:54:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:54:05 - End Time 2025-03-02 00:54:05 [2025-03-02 00:54:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587589', 'tblTempUsageDetail_20' ) start [2025-03-02 00:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587589', 'tblTempUsageDetail_20' ) end [2025-03-02 00:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587589', 'tblTempVendorCDR_20' ) start [2025-03-02 00:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587589', 'tblTempVendorCDR_20' ) end [2025-03-02 00:54:17] Production.INFO: ProcessCDR(1,14587589,1,1,2) [2025-03-02 00:54:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587589,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:54:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587589,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:54:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587589,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:54:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587589,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:54:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587589', 'tblTempUsageDetail_20' ) start [2025-03-02 00:54:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587589', 'tblTempUsageDetail_20' ) end [2025-03-02 00:54:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:54:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:54:20] Production.INFO: ==15625== Releasing lock... [2025-03-02 00:54:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:54:20] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 00:55:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:55:05 [end_date_ymd] => 2025-03-02 00:55:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:55:05' and `end` < '2025-03-02 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-03-02 00:55:17] Production.INFO: count ==427 [2025-03-02 00:55:18] Production.ERROR: pbx CDR StartTime 2025-03-01 21:55:05 - End Time 2025-03-02 00:55:05 [2025-03-02 00:55:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587594', 'tblTempUsageDetail_20' ) start [2025-03-02 00:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587594', 'tblTempUsageDetail_20' ) end [2025-03-02 00:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587594', 'tblTempVendorCDR_20' ) start [2025-03-02 00:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587594', 'tblTempVendorCDR_20' ) end [2025-03-02 00:55:18] Production.INFO: ProcessCDR(1,14587594,1,1,2) [2025-03-02 00:55:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587594,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:55:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587594,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:55:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587594,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:55:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587594,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587594', 'tblTempUsageDetail_20' ) start [2025-03-02 00:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587594', 'tblTempUsageDetail_20' ) end [2025-03-02 00:55:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:55:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:55:21] Production.INFO: ==15726== Releasing lock... [2025-03-02 00:55:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:55:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 00:56:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:56:06 [end_date_ymd] => 2025-03-02 00:56:06 [RateCDR] => 1 ) [2025-03-02 00: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-03-01 21:56:06' and `end` < '2025-03-02 00: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-03-02 00:56:18] Production.INFO: count ==427 [2025-03-02 00:56:18] Production.ERROR: pbx CDR StartTime 2025-03-01 21:56:06 - End Time 2025-03-02 00:56:06 [2025-03-02 00:56:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587599', 'tblTempUsageDetail_20' ) start [2025-03-02 00:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587599', 'tblTempUsageDetail_20' ) end [2025-03-02 00:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587599', 'tblTempVendorCDR_20' ) start [2025-03-02 00:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587599', 'tblTempVendorCDR_20' ) end [2025-03-02 00:56:18] Production.INFO: ProcessCDR(1,14587599,1,1,2) [2025-03-02 00:56:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587599,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:56:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587599,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:56:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587599,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:56:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587599,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:56:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587599', 'tblTempUsageDetail_20' ) start [2025-03-02 00:56:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587599', 'tblTempUsageDetail_20' ) end [2025-03-02 00:56:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:56:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:56:21] Production.INFO: ==15831== Releasing lock... [2025-03-02 00:56:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:56:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 00:57:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:57:05 [end_date_ymd] => 2025-03-02 00:57:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:57:05' and `end` < '2025-03-02 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-03-02 00:57:17] Production.INFO: count ==434 [2025-03-02 00:57:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:57:05 - End Time 2025-03-02 00:57:05 [2025-03-02 00:57:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587604', 'tblTempUsageDetail_20' ) start [2025-03-02 00:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587604', 'tblTempUsageDetail_20' ) end [2025-03-02 00:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587604', 'tblTempVendorCDR_20' ) start [2025-03-02 00:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587604', 'tblTempVendorCDR_20' ) end [2025-03-02 00:57:17] Production.INFO: ProcessCDR(1,14587604,1,1,2) [2025-03-02 00:57:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587604,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:57:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587604,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:57:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587604,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:57:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587604,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:57:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587604', 'tblTempUsageDetail_20' ) start [2025-03-02 00:57:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587604', 'tblTempUsageDetail_20' ) end [2025-03-02 00:57:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:57:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:57:21] Production.INFO: ==15919== Releasing lock... [2025-03-02 00:57:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:57:21] Production.INFO: 32 MB #Memory Used# [2025-03-02 00:58:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:58:06 [end_date_ymd] => 2025-03-02 00:58:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:58:06' and `end` < '2025-03-02 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-03-02 00:58:18] Production.INFO: count ==434 [2025-03-02 00:58:18] Production.ERROR: pbx CDR StartTime 2025-03-01 21:58:06 - End Time 2025-03-02 00:58:06 [2025-03-02 00:58:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587609', 'tblTempUsageDetail_20' ) start [2025-03-02 00:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587609', 'tblTempUsageDetail_20' ) end [2025-03-02 00:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587609', 'tblTempVendorCDR_20' ) start [2025-03-02 00:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587609', 'tblTempVendorCDR_20' ) end [2025-03-02 00:58:18] Production.INFO: ProcessCDR(1,14587609,1,1,2) [2025-03-02 00:58:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587609,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:58:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587609,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:58:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587609,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:58:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587609,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:58:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587609', 'tblTempUsageDetail_20' ) start [2025-03-02 00:58:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587609', 'tblTempUsageDetail_20' ) end [2025-03-02 00:58:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:58:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:58:21] Production.INFO: ==16017== Releasing lock... [2025-03-02 00:58:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:58:21] Production.INFO: 32 MB #Memory Used# [2025-03-02 00:59:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 21:59:05 [end_date_ymd] => 2025-03-02 00:59:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 21:59:05' and `end` < '2025-03-02 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-03-02 00:59:17] Production.INFO: count ==434 [2025-03-02 00:59:17] Production.ERROR: pbx CDR StartTime 2025-03-01 21:59:05 - End Time 2025-03-02 00:59:05 [2025-03-02 00:59:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 00:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587614', 'tblTempUsageDetail_20' ) start [2025-03-02 00:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587614', 'tblTempUsageDetail_20' ) end [2025-03-02 00:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587614', 'tblTempVendorCDR_20' ) start [2025-03-02 00:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587614', 'tblTempVendorCDR_20' ) end [2025-03-02 00:59:17] Production.INFO: ProcessCDR(1,14587614,1,1,2) [2025-03-02 00:59:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587614,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:59:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587614,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 00:59:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587614,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:59:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587614,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 00:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587614', 'tblTempUsageDetail_20' ) start [2025-03-02 00:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587614', 'tblTempUsageDetail_20' ) end [2025-03-02 00:59:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 00:59:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 00:59:21] Production.INFO: ==16117== Releasing lock... [2025-03-02 00:59:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 00:59:21] Production.INFO: 32 MB #Memory Used# [2025-03-02 01:00:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:00:07 [end_date_ymd] => 2025-03-02 01:00:07 [RateCDR] => 1 ) [2025-03-02 01: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-03-01 22:00:07' and `end` < '2025-03-02 01: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-03-02 01:00:19] Production.INFO: count ==438 [2025-03-02 01:00:19] Production.ERROR: pbx CDR StartTime 2025-03-01 22:00:07 - End Time 2025-03-02 01:00:07 [2025-03-02 01:00:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:00:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587619', 'tblTempUsageDetail_20' ) start [2025-03-02 01:00:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587619', 'tblTempUsageDetail_20' ) end [2025-03-02 01:00:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587619', 'tblTempVendorCDR_20' ) start [2025-03-02 01:00:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587619', 'tblTempVendorCDR_20' ) end [2025-03-02 01:00:19] Production.INFO: ProcessCDR(1,14587619,1,1,2) [2025-03-02 01:00:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587619,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:00:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587619,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:00:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587619,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:00:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587619,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:00:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587619', 'tblTempUsageDetail_20' ) start [2025-03-02 01:00:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587619', 'tblTempUsageDetail_20' ) end [2025-03-02 01:00:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:00:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:00:22] Production.INFO: ==16213== Releasing lock... [2025-03-02 01:00:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:00:22] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 01:01:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:01:05 [end_date_ymd] => 2025-03-02 01:01:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:01:05' and `end` < '2025-03-02 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-03-02 01:01:17] Production.INFO: count ==477 [2025-03-02 01:01:17] Production.ERROR: pbx CDR StartTime 2025-03-01 22:01:05 - End Time 2025-03-02 01:01:05 [2025-03-02 01:01:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587625', 'tblTempUsageDetail_20' ) start [2025-03-02 01:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587625', 'tblTempUsageDetail_20' ) end [2025-03-02 01:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587625', 'tblTempVendorCDR_20' ) start [2025-03-02 01:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587625', 'tblTempVendorCDR_20' ) end [2025-03-02 01:01:17] Production.INFO: ProcessCDR(1,14587625,1,1,2) [2025-03-02 01:01:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587625,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:01:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587625,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:01:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587625,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:01:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587625,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:01:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587625', 'tblTempUsageDetail_20' ) start [2025-03-02 01:01:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587625', 'tblTempUsageDetail_20' ) end [2025-03-02 01:01:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:01:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:01:20] Production.INFO: ==16327== Releasing lock... [2025-03-02 01:01:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:01:20] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 01:02:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:02:06 [end_date_ymd] => 2025-03-02 01:02:06 [RateCDR] => 1 ) [2025-03-02 01: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-03-01 22:02:06' and `end` < '2025-03-02 01: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-03-02 01:02:18] Production.INFO: count ==477 [2025-03-02 01:02:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:02:06 - End Time 2025-03-02 01:02:06 [2025-03-02 01:02:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587630', 'tblTempUsageDetail_20' ) start [2025-03-02 01:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587630', 'tblTempUsageDetail_20' ) end [2025-03-02 01:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587630', 'tblTempVendorCDR_20' ) start [2025-03-02 01:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587630', 'tblTempVendorCDR_20' ) end [2025-03-02 01:02:18] Production.INFO: ProcessCDR(1,14587630,1,1,2) [2025-03-02 01:02:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587630,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:02:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587630,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:02:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587630,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:02:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587630,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:02:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587630', 'tblTempUsageDetail_20' ) start [2025-03-02 01:02:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587630', 'tblTempUsageDetail_20' ) end [2025-03-02 01:02:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:02:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:02:21] Production.INFO: ==16415== Releasing lock... [2025-03-02 01:02:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:02:21] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 01:03:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:03:05 [end_date_ymd] => 2025-03-02 01:03:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:03:05' and `end` < '2025-03-02 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-03-02 01:03:17] Production.INFO: count ==477 [2025-03-02 01:03:17] Production.ERROR: pbx CDR StartTime 2025-03-01 22:03:05 - End Time 2025-03-02 01:03:05 [2025-03-02 01:03:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587635', 'tblTempUsageDetail_20' ) start [2025-03-02 01:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587635', 'tblTempUsageDetail_20' ) end [2025-03-02 01:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587635', 'tblTempVendorCDR_20' ) start [2025-03-02 01:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587635', 'tblTempVendorCDR_20' ) end [2025-03-02 01:03:17] Production.INFO: ProcessCDR(1,14587635,1,1,2) [2025-03-02 01:03:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587635,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:03:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587635,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:03:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587635,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:03:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587635,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:03:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587635', 'tblTempUsageDetail_20' ) start [2025-03-02 01:03:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587635', 'tblTempUsageDetail_20' ) end [2025-03-02 01:03:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:03:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:03:20] Production.INFO: ==16501== Releasing lock... [2025-03-02 01:03:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:03:20] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 01:04:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:04:05 [end_date_ymd] => 2025-03-02 01:04:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:04:05' and `end` < '2025-03-02 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-03-02 01:04:18] Production.INFO: count ==477 [2025-03-02 01:04:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:04:05 - End Time 2025-03-02 01:04:05 [2025-03-02 01:04:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:04:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587640', 'tblTempUsageDetail_20' ) start [2025-03-02 01:04:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587640', 'tblTempUsageDetail_20' ) end [2025-03-02 01:04:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587640', 'tblTempVendorCDR_20' ) start [2025-03-02 01:04:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587640', 'tblTempVendorCDR_20' ) end [2025-03-02 01:04:18] Production.INFO: ProcessCDR(1,14587640,1,1,2) [2025-03-02 01:04:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587640,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:04:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587640,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:04:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587640,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:04:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587640,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:04:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587640', 'tblTempUsageDetail_20' ) start [2025-03-02 01:04:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587640', 'tblTempUsageDetail_20' ) end [2025-03-02 01:04:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:04:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:04:21] Production.INFO: ==16589== Releasing lock... [2025-03-02 01:04:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:04:21] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 01:05:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:05:05 [end_date_ymd] => 2025-03-02 01:05:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:05:05' and `end` < '2025-03-02 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-03-02 01:05:17] Production.INFO: count ==474 [2025-03-02 01:05:17] Production.ERROR: pbx CDR StartTime 2025-03-01 22:05:05 - End Time 2025-03-02 01:05:05 [2025-03-02 01:05:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587645', 'tblTempUsageDetail_20' ) start [2025-03-02 01:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587645', 'tblTempUsageDetail_20' ) end [2025-03-02 01:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587645', 'tblTempVendorCDR_20' ) start [2025-03-02 01:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587645', 'tblTempVendorCDR_20' ) end [2025-03-02 01:05:17] Production.INFO: ProcessCDR(1,14587645,1,1,2) [2025-03-02 01:05:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587645,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:05:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587645,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:05:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587645,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:05:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587645,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:05:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587645', 'tblTempUsageDetail_20' ) start [2025-03-02 01:05:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587645', 'tblTempUsageDetail_20' ) end [2025-03-02 01:05:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:05:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:05:21] Production.INFO: ==16675== Releasing lock... [2025-03-02 01:05:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:05:21] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 01:06:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:06:05 [end_date_ymd] => 2025-03-02 01:06:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:06:05' and `end` < '2025-03-02 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-03-02 01:06:17] Production.INFO: count ==473 [2025-03-02 01:06:17] Production.ERROR: pbx CDR StartTime 2025-03-01 22:06:05 - End Time 2025-03-02 01:06:05 [2025-03-02 01:06:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587650', 'tblTempUsageDetail_20' ) start [2025-03-02 01:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587650', 'tblTempUsageDetail_20' ) end [2025-03-02 01:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587650', 'tblTempVendorCDR_20' ) start [2025-03-02 01:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587650', 'tblTempVendorCDR_20' ) end [2025-03-02 01:06:17] Production.INFO: ProcessCDR(1,14587650,1,1,2) [2025-03-02 01:06:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587650,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:06:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587650,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:06:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587650,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:06:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587650,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:06:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587650', 'tblTempUsageDetail_20' ) start [2025-03-02 01:06:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587650', 'tblTempUsageDetail_20' ) end [2025-03-02 01:06:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:06:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:06:21] Production.INFO: ==16760== Releasing lock... [2025-03-02 01:06:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:06:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 01:07:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:07:05 [end_date_ymd] => 2025-03-02 01:07:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:07:05' and `end` < '2025-03-02 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-03-02 01:07:17] Production.INFO: count ==472 [2025-03-02 01:07:17] Production.ERROR: pbx CDR StartTime 2025-03-01 22:07:05 - End Time 2025-03-02 01:07:05 [2025-03-02 01:07:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587655', 'tblTempUsageDetail_20' ) start [2025-03-02 01:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587655', 'tblTempUsageDetail_20' ) end [2025-03-02 01:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587655', 'tblTempVendorCDR_20' ) start [2025-03-02 01:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587655', 'tblTempVendorCDR_20' ) end [2025-03-02 01:07:17] Production.INFO: ProcessCDR(1,14587655,1,1,2) [2025-03-02 01:07:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587655,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:07:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587655,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:07:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587655,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:07:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587655,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:07:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587655', 'tblTempUsageDetail_20' ) start [2025-03-02 01:07:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587655', 'tblTempUsageDetail_20' ) end [2025-03-02 01:07:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:07:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:07:21] Production.INFO: ==16841== Releasing lock... [2025-03-02 01:07:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:07:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 01:08:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:08:05 [end_date_ymd] => 2025-03-02 01:08:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:08:05' and `end` < '2025-03-02 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-03-02 01:08:17] Production.INFO: count ==471 [2025-03-02 01:08:17] Production.ERROR: pbx CDR StartTime 2025-03-01 22:08:05 - End Time 2025-03-02 01:08:05 [2025-03-02 01:08:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587660', 'tblTempUsageDetail_20' ) start [2025-03-02 01:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587660', 'tblTempUsageDetail_20' ) end [2025-03-02 01:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587660', 'tblTempVendorCDR_20' ) start [2025-03-02 01:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587660', 'tblTempVendorCDR_20' ) end [2025-03-02 01:08:18] Production.INFO: ProcessCDR(1,14587660,1,1,2) [2025-03-02 01:08:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587660,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:08:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587660,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:08:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587660,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:08:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587660,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:08:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587660', 'tblTempUsageDetail_20' ) start [2025-03-02 01:08:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587660', 'tblTempUsageDetail_20' ) end [2025-03-02 01:08:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:08:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:08:21] Production.INFO: ==16926== Releasing lock... [2025-03-02 01:08:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:08:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 01:09:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:09:05 [end_date_ymd] => 2025-03-02 01:09:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:09:05' and `end` < '2025-03-02 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-03-02 01:09:17] Production.INFO: count ==474 [2025-03-02 01:09:17] Production.ERROR: pbx CDR StartTime 2025-03-01 22:09:05 - End Time 2025-03-02 01:09:05 [2025-03-02 01:09:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587665', 'tblTempUsageDetail_20' ) start [2025-03-02 01:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587665', 'tblTempUsageDetail_20' ) end [2025-03-02 01:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587665', 'tblTempVendorCDR_20' ) start [2025-03-02 01:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587665', 'tblTempVendorCDR_20' ) end [2025-03-02 01:09:17] Production.INFO: ProcessCDR(1,14587665,1,1,2) [2025-03-02 01:09:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587665,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:09:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587665,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:09:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587665,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:09:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587665,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:09:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587665', 'tblTempUsageDetail_20' ) start [2025-03-02 01:09:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587665', 'tblTempUsageDetail_20' ) end [2025-03-02 01:09:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:09:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:09:21] Production.INFO: ==17011== Releasing lock... [2025-03-02 01:09:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:09:21] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 01:10:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:10:07 [end_date_ymd] => 2025-03-02 01:10:07 [RateCDR] => 1 ) [2025-03-02 01: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-03-01 22:10:07' and `end` < '2025-03-02 01: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-03-02 01:10:19] Production.INFO: count ==484 [2025-03-02 01:10:19] Production.ERROR: pbx CDR StartTime 2025-03-01 22:10:07 - End Time 2025-03-02 01:10:07 [2025-03-02 01:10:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:10:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587671', 'tblTempUsageDetail_20' ) start [2025-03-02 01:10:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587671', 'tblTempUsageDetail_20' ) end [2025-03-02 01:10:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587671', 'tblTempVendorCDR_20' ) start [2025-03-02 01:10:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587671', 'tblTempVendorCDR_20' ) end [2025-03-02 01:10:19] Production.INFO: ProcessCDR(1,14587671,1,1,2) [2025-03-02 01:10:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587671,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:10:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587671,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:10:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587671,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:10:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587671,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:10:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587671', 'tblTempUsageDetail_20' ) start [2025-03-02 01:10:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587671', 'tblTempUsageDetail_20' ) end [2025-03-02 01:10:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:10:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:10:22] Production.INFO: ==17142== Releasing lock... [2025-03-02 01:10:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:10:22] Production.INFO: 32.75 MB #Memory Used# [2025-03-02 01:11:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:11:05 [end_date_ymd] => 2025-03-02 01:11:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:11:05' and `end` < '2025-03-02 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-03-02 01:11:17] Production.INFO: count ==498 [2025-03-02 01:11:17] Production.ERROR: pbx CDR StartTime 2025-03-01 22:11:05 - End Time 2025-03-02 01:11:05 [2025-03-02 01:11:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587676', 'tblTempUsageDetail_20' ) start [2025-03-02 01:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587676', 'tblTempUsageDetail_20' ) end [2025-03-02 01:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587676', 'tblTempVendorCDR_20' ) start [2025-03-02 01:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587676', 'tblTempVendorCDR_20' ) end [2025-03-02 01:11:17] Production.INFO: ProcessCDR(1,14587676,1,1,2) [2025-03-02 01:11:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587676,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:11:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587676,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:11:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587676,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:11:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587676,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:11:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587676', 'tblTempUsageDetail_20' ) start [2025-03-02 01:11:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587676', 'tblTempUsageDetail_20' ) end [2025-03-02 01:11:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:11:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:11:21] Production.INFO: ==17221== Releasing lock... [2025-03-02 01:11:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:11:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 01:12:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:12:06 [end_date_ymd] => 2025-03-02 01:12:06 [RateCDR] => 1 ) [2025-03-02 01: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-03-01 22:12:06' and `end` < '2025-03-02 01: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-03-02 01:12:18] Production.INFO: count ==498 [2025-03-02 01:12:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:12:06 - End Time 2025-03-02 01:12:06 [2025-03-02 01:12:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587681', 'tblTempUsageDetail_20' ) start [2025-03-02 01:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587681', 'tblTempUsageDetail_20' ) end [2025-03-02 01:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587681', 'tblTempVendorCDR_20' ) start [2025-03-02 01:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587681', 'tblTempVendorCDR_20' ) end [2025-03-02 01:12:18] Production.INFO: ProcessCDR(1,14587681,1,1,2) [2025-03-02 01:12:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587681,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:12:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587681,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:12:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587681,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:12:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587681,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:12:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587681', 'tblTempUsageDetail_20' ) start [2025-03-02 01:12:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587681', 'tblTempUsageDetail_20' ) end [2025-03-02 01:12:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:12:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:12:21] Production.INFO: ==17305== Releasing lock... [2025-03-02 01:12:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:12:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 01:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:13:05 [end_date_ymd] => 2025-03-02 01:13:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:13:05' and `end` < '2025-03-02 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-03-02 01:13:17] Production.INFO: count ==499 [2025-03-02 01:13:17] Production.ERROR: pbx CDR StartTime 2025-03-01 22:13:05 - End Time 2025-03-02 01:13:05 [2025-03-02 01:13:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587686', 'tblTempUsageDetail_20' ) start [2025-03-02 01:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587686', 'tblTempUsageDetail_20' ) end [2025-03-02 01:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587686', 'tblTempVendorCDR_20' ) start [2025-03-02 01:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587686', 'tblTempVendorCDR_20' ) end [2025-03-02 01:13:17] Production.INFO: ProcessCDR(1,14587686,1,1,2) [2025-03-02 01:13:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587686,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:13:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587686,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:13:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587686,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:13:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587686,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:13:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587686', 'tblTempUsageDetail_20' ) start [2025-03-02 01:13:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587686', 'tblTempUsageDetail_20' ) end [2025-03-02 01:13:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:13:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:13:20] Production.INFO: ==17384== Releasing lock... [2025-03-02 01:13:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:13:20] Production.INFO: 32.75 MB #Memory Used# [2025-03-02 01:14:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:14:05 [end_date_ymd] => 2025-03-02 01:14:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:14:05' and `end` < '2025-03-02 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-03-02 01:14:17] Production.INFO: count ==502 [2025-03-02 01:14:17] Production.ERROR: pbx CDR StartTime 2025-03-01 22:14:05 - End Time 2025-03-02 01:14:05 [2025-03-02 01:14:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587691', 'tblTempUsageDetail_20' ) start [2025-03-02 01:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587691', 'tblTempUsageDetail_20' ) end [2025-03-02 01:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587691', 'tblTempVendorCDR_20' ) start [2025-03-02 01:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587691', 'tblTempVendorCDR_20' ) end [2025-03-02 01:14:17] Production.INFO: ProcessCDR(1,14587691,1,1,2) [2025-03-02 01:14:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587691,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:14:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587691,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:14:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587691,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:14:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587691,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:14:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587691', 'tblTempUsageDetail_20' ) start [2025-03-02 01:14:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587691', 'tblTempUsageDetail_20' ) end [2025-03-02 01:14:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:14:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:14:20] Production.INFO: ==17462== Releasing lock... [2025-03-02 01:14:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:14:20] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 01:15:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:15:04 [end_date_ymd] => 2025-03-02 01:15:04 [RateCDR] => 1 ) [2025-03-02 01: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-03-01 22:15:04' and `end` < '2025-03-02 01: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-03-02 01:15:16] Production.INFO: count ==500 [2025-03-02 01:15:16] Production.ERROR: pbx CDR StartTime 2025-03-01 22:15:04 - End Time 2025-03-02 01:15:04 [2025-03-02 01:15:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587696', 'tblTempUsageDetail_20' ) start [2025-03-02 01:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587696', 'tblTempUsageDetail_20' ) end [2025-03-02 01:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587696', 'tblTempVendorCDR_20' ) start [2025-03-02 01:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587696', 'tblTempVendorCDR_20' ) end [2025-03-02 01:15:17] Production.INFO: ProcessCDR(1,14587696,1,1,2) [2025-03-02 01:15:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587696,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:15:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587696,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:15:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587696,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:15:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587696,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:15:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587696', 'tblTempUsageDetail_20' ) start [2025-03-02 01:15:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587696', 'tblTempUsageDetail_20' ) end [2025-03-02 01:15:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:15:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:15:20] Production.INFO: ==17540== Releasing lock... [2025-03-02 01:15:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:15:20] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 01:16:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:16:05 [end_date_ymd] => 2025-03-02 01:16:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:16:05' and `end` < '2025-03-02 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-03-02 01:16:17] Production.INFO: count ==507 [2025-03-02 01:16:17] Production.ERROR: pbx CDR StartTime 2025-03-01 22:16:05 - End Time 2025-03-02 01:16:05 [2025-03-02 01:16:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587701', 'tblTempUsageDetail_20' ) start [2025-03-02 01:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587701', 'tblTempUsageDetail_20' ) end [2025-03-02 01:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587701', 'tblTempVendorCDR_20' ) start [2025-03-02 01:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587701', 'tblTempVendorCDR_20' ) end [2025-03-02 01:16:17] Production.INFO: ProcessCDR(1,14587701,1,1,2) [2025-03-02 01:16:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587701,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:16:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587701,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:16:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587701,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:16:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587701,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587701', 'tblTempUsageDetail_20' ) start [2025-03-02 01:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587701', 'tblTempUsageDetail_20' ) end [2025-03-02 01:16:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:16:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:16:21] Production.INFO: ==17621== Releasing lock... [2025-03-02 01:16:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:16:21] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 01:17:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:17:05 [end_date_ymd] => 2025-03-02 01:17:05 [RateCDR] => 1 ) [2025-03-02 01: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-03-01 22:17:05' and `end` < '2025-03-02 01: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-03-02 01:17:17] Production.INFO: count ==507 [2025-03-02 01:17:17] Production.ERROR: pbx CDR StartTime 2025-03-01 22:17:05 - End Time 2025-03-02 01:17:05 [2025-03-02 01:17:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587706', 'tblTempUsageDetail_20' ) start [2025-03-02 01:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587706', 'tblTempUsageDetail_20' ) end [2025-03-02 01:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587706', 'tblTempVendorCDR_20' ) start [2025-03-02 01:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587706', 'tblTempVendorCDR_20' ) end [2025-03-02 01:17:17] Production.INFO: ProcessCDR(1,14587706,1,1,2) [2025-03-02 01:17:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587706,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:17:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587706,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:17:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587706,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:17:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587706,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:17:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587706', 'tblTempUsageDetail_20' ) start [2025-03-02 01:17:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587706', 'tblTempUsageDetail_20' ) end [2025-03-02 01:17:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:17:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:17:20] Production.INFO: ==17699== Releasing lock... [2025-03-02 01:17:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:17:20] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 01:18:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:18:05 [end_date_ymd] => 2025-03-02 01:18:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:18:05' and `end` < '2025-03-02 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-03-02 01:18:17] Production.INFO: count ==507 [2025-03-02 01:18:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:18:05 - End Time 2025-03-02 01:18:05 [2025-03-02 01:18:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587711', 'tblTempUsageDetail_20' ) start [2025-03-02 01:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587711', 'tblTempUsageDetail_20' ) end [2025-03-02 01:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587711', 'tblTempVendorCDR_20' ) start [2025-03-02 01:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587711', 'tblTempVendorCDR_20' ) end [2025-03-02 01:18:18] Production.INFO: ProcessCDR(1,14587711,1,1,2) [2025-03-02 01:18:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587711,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:18:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587711,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:18:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587711,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:18:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587711,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587711', 'tblTempUsageDetail_20' ) start [2025-03-02 01:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587711', 'tblTempUsageDetail_20' ) end [2025-03-02 01:18:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:18:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:18:21] Production.INFO: ==17777== Releasing lock... [2025-03-02 01:18:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:18:21] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 01:19:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:19:06 [end_date_ymd] => 2025-03-02 01:19:06 [RateCDR] => 1 ) [2025-03-02 01: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-03-01 22:19:06' and `end` < '2025-03-02 01: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-03-02 01:19:18] Production.INFO: count ==511 [2025-03-02 01:19:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:19:06 - End Time 2025-03-02 01:19:06 [2025-03-02 01:19:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587716', 'tblTempUsageDetail_20' ) start [2025-03-02 01:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587716', 'tblTempUsageDetail_20' ) end [2025-03-02 01:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587716', 'tblTempVendorCDR_20' ) start [2025-03-02 01:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587716', 'tblTempVendorCDR_20' ) end [2025-03-02 01:19:18] Production.INFO: ProcessCDR(1,14587716,1,1,2) [2025-03-02 01:19:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587716,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:19:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587716,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:19:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587716,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:19:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587716,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:19:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587716', 'tblTempUsageDetail_20' ) start [2025-03-02 01:19:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587716', 'tblTempUsageDetail_20' ) end [2025-03-02 01:19:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:19:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:19:22] Production.INFO: ==17879== Releasing lock... [2025-03-02 01:19:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:19:22] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 01:20:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:20:06 [end_date_ymd] => 2025-03-02 01:20:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:20:06' and `end` < '2025-03-02 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-03-02 01:20:18] Production.INFO: count ==519 [2025-03-02 01:20:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:20:06 - End Time 2025-03-02 01:20:06 [2025-03-02 01:20:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587722', 'tblTempUsageDetail_20' ) start [2025-03-02 01:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587722', 'tblTempUsageDetail_20' ) end [2025-03-02 01:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587722', 'tblTempVendorCDR_20' ) start [2025-03-02 01:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587722', 'tblTempVendorCDR_20' ) end [2025-03-02 01:20:18] Production.INFO: ProcessCDR(1,14587722,1,1,2) [2025-03-02 01:20:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587722,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:20:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587722,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:20:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587722,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:20:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587722,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587722', 'tblTempUsageDetail_20' ) start [2025-03-02 01:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587722', 'tblTempUsageDetail_20' ) end [2025-03-02 01:20:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:20:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:20:22] Production.INFO: ==17956== Releasing lock... [2025-03-02 01:20:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:20:22] Production.INFO: 33 MB #Memory Used# [2025-03-02 01:21:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:21:06 [end_date_ymd] => 2025-03-02 01:21:06 [RateCDR] => 1 ) [2025-03-02 01: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-03-01 22:21:06' and `end` < '2025-03-02 01: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-03-02 01:21:18] Production.INFO: count ==533 [2025-03-02 01:21:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:21:06 - End Time 2025-03-02 01:21:06 [2025-03-02 01:21:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:21:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587727', 'tblTempUsageDetail_20' ) start [2025-03-02 01:21:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587727', 'tblTempUsageDetail_20' ) end [2025-03-02 01:21:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587727', 'tblTempVendorCDR_20' ) start [2025-03-02 01:21:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587727', 'tblTempVendorCDR_20' ) end [2025-03-02 01:21:18] Production.INFO: ProcessCDR(1,14587727,1,1,2) [2025-03-02 01:21:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587727,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:21:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587727,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:21:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587727,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:21:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587727,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:21:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587727', 'tblTempUsageDetail_20' ) start [2025-03-02 01:21:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587727', 'tblTempUsageDetail_20' ) end [2025-03-02 01:21:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:21:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:21:21] Production.INFO: ==18037== Releasing lock... [2025-03-02 01:21:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:21:21] Production.INFO: 33 MB #Memory Used# [2025-03-02 01:22:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:22:05 [end_date_ymd] => 2025-03-02 01:22:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:22:05' and `end` < '2025-03-02 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-03-02 01:22:17] Production.INFO: count ==533 [2025-03-02 01:22:17] Production.ERROR: pbx CDR StartTime 2025-03-01 22:22:05 - End Time 2025-03-02 01:22:05 [2025-03-02 01:22:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587732', 'tblTempUsageDetail_20' ) start [2025-03-02 01:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587732', 'tblTempUsageDetail_20' ) end [2025-03-02 01:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587732', 'tblTempVendorCDR_20' ) start [2025-03-02 01:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587732', 'tblTempVendorCDR_20' ) end [2025-03-02 01:22:17] Production.INFO: ProcessCDR(1,14587732,1,1,2) [2025-03-02 01:22:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587732,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:22:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587732,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:22:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587732,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:22:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587732,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587732', 'tblTempUsageDetail_20' ) start [2025-03-02 01:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587732', 'tblTempUsageDetail_20' ) end [2025-03-02 01:22:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:22:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:22:21] Production.INFO: ==18117== Releasing lock... [2025-03-02 01:22:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:22:21] Production.INFO: 33 MB #Memory Used# [2025-03-02 01:23:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:23:05 [end_date_ymd] => 2025-03-02 01:23:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:23:05' and `end` < '2025-03-02 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-03-02 01:23:17] Production.INFO: count ==535 [2025-03-02 01:23:17] Production.ERROR: pbx CDR StartTime 2025-03-01 22:23:05 - End Time 2025-03-02 01:23:05 [2025-03-02 01:23:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587737', 'tblTempUsageDetail_20' ) start [2025-03-02 01:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587737', 'tblTempUsageDetail_20' ) end [2025-03-02 01:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587737', 'tblTempVendorCDR_20' ) start [2025-03-02 01:23:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587737', 'tblTempVendorCDR_20' ) end [2025-03-02 01:23:18] Production.INFO: ProcessCDR(1,14587737,1,1,2) [2025-03-02 01:23:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587737,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:23:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587737,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:23:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587737,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:23:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587737,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:23:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587737', 'tblTempUsageDetail_20' ) start [2025-03-02 01:23:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587737', 'tblTempUsageDetail_20' ) end [2025-03-02 01:23:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:23:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:23:21] Production.INFO: ==18193== Releasing lock... [2025-03-02 01:23:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:23:21] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 01:24:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:24:06 [end_date_ymd] => 2025-03-02 01:24:06 [RateCDR] => 1 ) [2025-03-02 01: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-03-01 22:24:06' and `end` < '2025-03-02 01: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-03-02 01:24:18] Production.INFO: count ==535 [2025-03-02 01:24:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:24:06 - End Time 2025-03-02 01:24:06 [2025-03-02 01:24:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587742', 'tblTempUsageDetail_20' ) start [2025-03-02 01:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587742', 'tblTempUsageDetail_20' ) end [2025-03-02 01:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587742', 'tblTempVendorCDR_20' ) start [2025-03-02 01:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587742', 'tblTempVendorCDR_20' ) end [2025-03-02 01:24:18] Production.INFO: ProcessCDR(1,14587742,1,1,2) [2025-03-02 01:24:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587742,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:24:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587742,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:24:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587742,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:24:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587742,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587742', 'tblTempUsageDetail_20' ) start [2025-03-02 01:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587742', 'tblTempUsageDetail_20' ) end [2025-03-02 01:24:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:24:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:24:21] Production.INFO: ==18268== Releasing lock... [2025-03-02 01:24:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:24:21] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 01:25:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:25:06 [end_date_ymd] => 2025-03-02 01:25:06 [RateCDR] => 1 ) [2025-03-02 01: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-03-01 22:25:06' and `end` < '2025-03-02 01: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-03-02 01:25:18] Production.INFO: count ==535 [2025-03-02 01:25:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:25:06 - End Time 2025-03-02 01:25:06 [2025-03-02 01:25:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587747', 'tblTempUsageDetail_20' ) start [2025-03-02 01:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587747', 'tblTempUsageDetail_20' ) end [2025-03-02 01:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587747', 'tblTempVendorCDR_20' ) start [2025-03-02 01:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587747', 'tblTempVendorCDR_20' ) end [2025-03-02 01:25:18] Production.INFO: ProcessCDR(1,14587747,1,1,2) [2025-03-02 01:25:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587747,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:25:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587747,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:25:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587747,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:25:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587747,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:25:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587747', 'tblTempUsageDetail_20' ) start [2025-03-02 01:25:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587747', 'tblTempUsageDetail_20' ) end [2025-03-02 01:25:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:25:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:25:22] Production.INFO: ==18393== Releasing lock... [2025-03-02 01:25:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:25:22] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 01:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:26:05 [end_date_ymd] => 2025-03-02 01:26:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:26:05' and `end` < '2025-03-02 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-03-02 01:26:17] Production.INFO: count ==535 [2025-03-02 01:26:17] Production.ERROR: pbx CDR StartTime 2025-03-01 22:26:05 - End Time 2025-03-02 01:26:05 [2025-03-02 01:26:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587752', 'tblTempUsageDetail_20' ) start [2025-03-02 01:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587752', 'tblTempUsageDetail_20' ) end [2025-03-02 01:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587752', 'tblTempVendorCDR_20' ) start [2025-03-02 01:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587752', 'tblTempVendorCDR_20' ) end [2025-03-02 01:26:17] Production.INFO: ProcessCDR(1,14587752,1,1,2) [2025-03-02 01:26:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587752,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:26:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587752,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:26:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587752,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:26:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587752,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:26:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587752', 'tblTempUsageDetail_20' ) start [2025-03-02 01:26:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587752', 'tblTempUsageDetail_20' ) end [2025-03-02 01:26:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:26:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:26:21] Production.INFO: ==18478== Releasing lock... [2025-03-02 01:26:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:26:21] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 01:27:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:27:06 [end_date_ymd] => 2025-03-02 01:27:06 [RateCDR] => 1 ) [2025-03-02 01: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-03-01 22:27:06' and `end` < '2025-03-02 01: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-03-02 01:27:18] Production.INFO: count ==535 [2025-03-02 01:27:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:27:06 - End Time 2025-03-02 01:27:06 [2025-03-02 01:27:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:27:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587757', 'tblTempUsageDetail_20' ) start [2025-03-02 01:27:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587757', 'tblTempUsageDetail_20' ) end [2025-03-02 01:27:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587757', 'tblTempVendorCDR_20' ) start [2025-03-02 01:27:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587757', 'tblTempVendorCDR_20' ) end [2025-03-02 01:27:18] Production.INFO: ProcessCDR(1,14587757,1,1,2) [2025-03-02 01:27:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587757,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:27:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587757,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:27:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587757,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:27:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587757,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:27:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587757', 'tblTempUsageDetail_20' ) start [2025-03-02 01:27:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587757', 'tblTempUsageDetail_20' ) end [2025-03-02 01:27:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:27:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:27:21] Production.INFO: ==18554== Releasing lock... [2025-03-02 01:27:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:27:21] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 01:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:28:05 [end_date_ymd] => 2025-03-02 01:28:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:28:05' and `end` < '2025-03-02 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-03-02 01:28:17] Production.INFO: count ==535 [2025-03-02 01:28:17] Production.ERROR: pbx CDR StartTime 2025-03-01 22:28:05 - End Time 2025-03-02 01:28:05 [2025-03-02 01:28:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587762', 'tblTempUsageDetail_20' ) start [2025-03-02 01:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587762', 'tblTempUsageDetail_20' ) end [2025-03-02 01:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587762', 'tblTempVendorCDR_20' ) start [2025-03-02 01:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587762', 'tblTempVendorCDR_20' ) end [2025-03-02 01:28:17] Production.INFO: ProcessCDR(1,14587762,1,1,2) [2025-03-02 01:28:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587762,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:28:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587762,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:28:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587762,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:28:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587762,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:28:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587762', 'tblTempUsageDetail_20' ) start [2025-03-02 01:28:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587762', 'tblTempUsageDetail_20' ) end [2025-03-02 01:28:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:28:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:28:20] Production.INFO: ==18637== Releasing lock... [2025-03-02 01:28:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:28:20] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 01:29:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:29:06 [end_date_ymd] => 2025-03-02 01:29:06 [RateCDR] => 1 ) [2025-03-02 01: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-03-01 22:29:06' and `end` < '2025-03-02 01: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-03-02 01:29:18] Production.INFO: count ==537 [2025-03-02 01:29:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:29:06 - End Time 2025-03-02 01:29:06 [2025-03-02 01:29:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587767', 'tblTempUsageDetail_20' ) start [2025-03-02 01:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587767', 'tblTempUsageDetail_20' ) end [2025-03-02 01:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587767', 'tblTempVendorCDR_20' ) start [2025-03-02 01:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587767', 'tblTempVendorCDR_20' ) end [2025-03-02 01:29:18] Production.INFO: ProcessCDR(1,14587767,1,1,2) [2025-03-02 01:29:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587767,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:29:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587767,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:29:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587767,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:29:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587767,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:29:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587767', 'tblTempUsageDetail_20' ) start [2025-03-02 01:29:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587767', 'tblTempUsageDetail_20' ) end [2025-03-02 01:29:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:29:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:29:23] Production.INFO: ==18721== Releasing lock... [2025-03-02 01:29:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:29:23] Production.INFO: 32.75 MB #Memory Used# [2025-03-02 01:30:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:30:06 [end_date_ymd] => 2025-03-02 01:30:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:30:06' and `end` < '2025-03-02 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-03-02 01:30:18] Production.INFO: count ==548 [2025-03-02 01:30:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:30:06 - End Time 2025-03-02 01:30:06 [2025-03-02 01:30:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587772', 'tblTempUsageDetail_20' ) start [2025-03-02 01:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587772', 'tblTempUsageDetail_20' ) end [2025-03-02 01:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587772', 'tblTempVendorCDR_20' ) start [2025-03-02 01:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587772', 'tblTempVendorCDR_20' ) end [2025-03-02 01:30:18] Production.INFO: ProcessCDR(1,14587772,1,1,2) [2025-03-02 01:30:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587772,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:30:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587772,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:30:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587772,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:30:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587772,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:30:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587772', 'tblTempUsageDetail_20' ) start [2025-03-02 01:30:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587772', 'tblTempUsageDetail_20' ) end [2025-03-02 01:30:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:30:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:30:21] Production.INFO: ==18797== Releasing lock... [2025-03-02 01:30:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:30:21] Production.INFO: 33 MB #Memory Used# [2025-03-02 01:31:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:31:06 [end_date_ymd] => 2025-03-02 01:31:06 [RateCDR] => 1 ) [2025-03-02 01: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-03-01 22:31:06' and `end` < '2025-03-02 01: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-03-02 01:31:18] Production.INFO: count ==566 [2025-03-02 01:31:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:31:06 - End Time 2025-03-02 01:31:06 [2025-03-02 01:31:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587778', 'tblTempUsageDetail_20' ) start [2025-03-02 01:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587778', 'tblTempUsageDetail_20' ) end [2025-03-02 01:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587778', 'tblTempVendorCDR_20' ) start [2025-03-02 01:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587778', 'tblTempVendorCDR_20' ) end [2025-03-02 01:31:18] Production.INFO: ProcessCDR(1,14587778,1,1,2) [2025-03-02 01:31:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587778,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:31:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587778,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:31:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587778,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:31:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587778,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:31:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587778', 'tblTempUsageDetail_20' ) start [2025-03-02 01:31:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587778', 'tblTempUsageDetail_20' ) end [2025-03-02 01:31:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:31:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:31:22] Production.INFO: ==18875== Releasing lock... [2025-03-02 01:31:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:31:22] Production.INFO: 33 MB #Memory Used# [2025-03-02 01:32:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:32:05 [end_date_ymd] => 2025-03-02 01:32:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:32:05' and `end` < '2025-03-02 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-03-02 01:32:17] Production.INFO: count ==566 [2025-03-02 01:32:17] Production.ERROR: pbx CDR StartTime 2025-03-01 22:32:05 - End Time 2025-03-02 01:32:05 [2025-03-02 01:32:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587783', 'tblTempUsageDetail_20' ) start [2025-03-02 01:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587783', 'tblTempUsageDetail_20' ) end [2025-03-02 01:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587783', 'tblTempVendorCDR_20' ) start [2025-03-02 01:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587783', 'tblTempVendorCDR_20' ) end [2025-03-02 01:32:17] Production.INFO: ProcessCDR(1,14587783,1,1,2) [2025-03-02 01:32:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587783,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:32:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587783,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:32:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587783,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:32:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587783,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:32:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587783', 'tblTempUsageDetail_20' ) start [2025-03-02 01:32:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587783', 'tblTempUsageDetail_20' ) end [2025-03-02 01:32:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:32:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:32:21] Production.INFO: ==18950== Releasing lock... [2025-03-02 01:32:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:32:21] Production.INFO: 33 MB #Memory Used# [2025-03-02 01:33:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:33:06 [end_date_ymd] => 2025-03-02 01:33:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:33:06' and `end` < '2025-03-02 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-03-02 01:33:18] Production.INFO: count ==563 [2025-03-02 01:33:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:33:06 - End Time 2025-03-02 01:33:06 [2025-03-02 01:33:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587788', 'tblTempUsageDetail_20' ) start [2025-03-02 01:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587788', 'tblTempUsageDetail_20' ) end [2025-03-02 01:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587788', 'tblTempVendorCDR_20' ) start [2025-03-02 01:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587788', 'tblTempVendorCDR_20' ) end [2025-03-02 01:33:18] Production.INFO: ProcessCDR(1,14587788,1,1,2) [2025-03-02 01:33:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587788,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:33:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587788,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:33:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587788,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:33:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587788,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:33:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587788', 'tblTempUsageDetail_20' ) start [2025-03-02 01:33:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587788', 'tblTempUsageDetail_20' ) end [2025-03-02 01:33:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:33:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:33:21] Production.INFO: ==19024== Releasing lock... [2025-03-02 01:33:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:33:21] Production.INFO: 33 MB #Memory Used# [2025-03-02 01:34:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:34:05 [end_date_ymd] => 2025-03-02 01:34:05 [RateCDR] => 1 ) [2025-03-02 01: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-03-01 22:34:05' and `end` < '2025-03-02 01: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-03-02 01:34:18] Production.INFO: count ==564 [2025-03-02 01:34:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:34:05 - End Time 2025-03-02 01:34:05 [2025-03-02 01:34:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587793', 'tblTempUsageDetail_20' ) start [2025-03-02 01:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587793', 'tblTempUsageDetail_20' ) end [2025-03-02 01:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587793', 'tblTempVendorCDR_20' ) start [2025-03-02 01:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587793', 'tblTempVendorCDR_20' ) end [2025-03-02 01:34:18] Production.INFO: ProcessCDR(1,14587793,1,1,2) [2025-03-02 01:34:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587793,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:34:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587793,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:34:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587793,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:34:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587793,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:34:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587793', 'tblTempUsageDetail_20' ) start [2025-03-02 01:34:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587793', 'tblTempUsageDetail_20' ) end [2025-03-02 01:34:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:34:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:34:22] Production.INFO: ==19110== Releasing lock... [2025-03-02 01:34:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:34:22] Production.INFO: 33 MB #Memory Used# [2025-03-02 01:35:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:35:06 [end_date_ymd] => 2025-03-02 01:35:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:35:06' and `end` < '2025-03-02 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-03-02 01:35:18] Production.INFO: count ==562 [2025-03-02 01:35:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:35:06 - End Time 2025-03-02 01:35:06 [2025-03-02 01:35:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587798', 'tblTempUsageDetail_20' ) start [2025-03-02 01:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587798', 'tblTempUsageDetail_20' ) end [2025-03-02 01:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587798', 'tblTempVendorCDR_20' ) start [2025-03-02 01:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587798', 'tblTempVendorCDR_20' ) end [2025-03-02 01:35:18] Production.INFO: ProcessCDR(1,14587798,1,1,2) [2025-03-02 01:35:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587798,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:35:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587798,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:35:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587798,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:35:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587798,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:35:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587798', 'tblTempUsageDetail_20' ) start [2025-03-02 01:35:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587798', 'tblTempUsageDetail_20' ) end [2025-03-02 01:35:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:35:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:35:21] Production.INFO: ==19195== Releasing lock... [2025-03-02 01:35:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:35:21] Production.INFO: 33.25 MB #Memory Used# [2025-03-02 01:36:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:36:05 [end_date_ymd] => 2025-03-02 01:36:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:36:05' and `end` < '2025-03-02 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-03-02 01:36:17] Production.INFO: count ==560 [2025-03-02 01:36:17] Production.ERROR: pbx CDR StartTime 2025-03-01 22:36:05 - End Time 2025-03-02 01:36:05 [2025-03-02 01:36:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587803', 'tblTempUsageDetail_20' ) start [2025-03-02 01:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587803', 'tblTempUsageDetail_20' ) end [2025-03-02 01:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587803', 'tblTempVendorCDR_20' ) start [2025-03-02 01:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587803', 'tblTempVendorCDR_20' ) end [2025-03-02 01:36:17] Production.INFO: ProcessCDR(1,14587803,1,1,2) [2025-03-02 01:36:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587803,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:36:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587803,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:36:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587803,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:36:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587803,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:36:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587803', 'tblTempUsageDetail_20' ) start [2025-03-02 01:36:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587803', 'tblTempUsageDetail_20' ) end [2025-03-02 01:36:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:36:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:36:23] Production.INFO: ==19270== Releasing lock... [2025-03-02 01:36:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:36:23] Production.INFO: 33 MB #Memory Used# [2025-03-02 01:37:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:37:06 [end_date_ymd] => 2025-03-02 01:37:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:37:06' and `end` < '2025-03-02 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-03-02 01:37:18] Production.INFO: count ==550 [2025-03-02 01:37:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:37:06 - End Time 2025-03-02 01:37:06 [2025-03-02 01:37:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587808', 'tblTempUsageDetail_20' ) start [2025-03-02 01:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587808', 'tblTempUsageDetail_20' ) end [2025-03-02 01:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587808', 'tblTempVendorCDR_20' ) start [2025-03-02 01:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587808', 'tblTempVendorCDR_20' ) end [2025-03-02 01:37:18] Production.INFO: ProcessCDR(1,14587808,1,1,2) [2025-03-02 01:37:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587808,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:37:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587808,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:37:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587808,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:37:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587808,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:37:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587808', 'tblTempUsageDetail_20' ) start [2025-03-02 01:37:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587808', 'tblTempUsageDetail_20' ) end [2025-03-02 01:37:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:37:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:37:22] Production.INFO: ==19347== Releasing lock... [2025-03-02 01:37:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:37:22] Production.INFO: 33 MB #Memory Used# [2025-03-02 01:38:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:38:05 [end_date_ymd] => 2025-03-02 01:38:05 [RateCDR] => 1 ) [2025-03-02 01: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-03-01 22:38:05' and `end` < '2025-03-02 01: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-03-02 01:38:17] Production.INFO: count ==545 [2025-03-02 01:38:17] Production.ERROR: pbx CDR StartTime 2025-03-01 22:38:05 - End Time 2025-03-02 01:38:05 [2025-03-02 01:38:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587813', 'tblTempUsageDetail_20' ) start [2025-03-02 01:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587813', 'tblTempUsageDetail_20' ) end [2025-03-02 01:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587813', 'tblTempVendorCDR_20' ) start [2025-03-02 01:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587813', 'tblTempVendorCDR_20' ) end [2025-03-02 01:38:17] Production.INFO: ProcessCDR(1,14587813,1,1,2) [2025-03-02 01:38:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587813,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:38:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587813,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:38:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587813,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:38:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587813,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587813', 'tblTempUsageDetail_20' ) start [2025-03-02 01:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587813', 'tblTempUsageDetail_20' ) end [2025-03-02 01:38:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:38:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:38:21] Production.INFO: ==19425== Releasing lock... [2025-03-02 01:38:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:38:21] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 01:39:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:39:06 [end_date_ymd] => 2025-03-02 01:39:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:39:06' and `end` < '2025-03-02 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-03-02 01:39:18] Production.INFO: count ==537 [2025-03-02 01:39:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:39:06 - End Time 2025-03-02 01:39:06 [2025-03-02 01:39:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587818', 'tblTempUsageDetail_20' ) start [2025-03-02 01:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587818', 'tblTempUsageDetail_20' ) end [2025-03-02 01:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587818', 'tblTempVendorCDR_20' ) start [2025-03-02 01:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587818', 'tblTempVendorCDR_20' ) end [2025-03-02 01:39:18] Production.INFO: ProcessCDR(1,14587818,1,1,2) [2025-03-02 01:39:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587818,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:39:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587818,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:39:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587818,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:39:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587818,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:39:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587818', 'tblTempUsageDetail_20' ) start [2025-03-02 01:39:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587818', 'tblTempUsageDetail_20' ) end [2025-03-02 01:39:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:39:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:39:22] Production.INFO: ==19499== Releasing lock... [2025-03-02 01:39:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:39:22] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 01:40:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:40:06 [end_date_ymd] => 2025-03-02 01:40:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:40:06' and `end` < '2025-03-02 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-03-02 01:40:18] Production.INFO: count ==546 [2025-03-02 01:40:19] Production.ERROR: pbx CDR StartTime 2025-03-01 22:40:06 - End Time 2025-03-02 01:40:06 [2025-03-02 01:40:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587824', 'tblTempUsageDetail_20' ) start [2025-03-02 01:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587824', 'tblTempUsageDetail_20' ) end [2025-03-02 01:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587824', 'tblTempVendorCDR_20' ) start [2025-03-02 01:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587824', 'tblTempVendorCDR_20' ) end [2025-03-02 01:40:19] Production.INFO: ProcessCDR(1,14587824,1,1,2) [2025-03-02 01:40:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587824,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:40:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587824,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:40:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587824,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:40:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587824,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:40:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587824', 'tblTempUsageDetail_20' ) start [2025-03-02 01:40:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587824', 'tblTempUsageDetail_20' ) end [2025-03-02 01:40:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:40:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:40:24] Production.INFO: ==19579== Releasing lock... [2025-03-02 01:40:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:40:24] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 01:41:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:41:06 [end_date_ymd] => 2025-03-02 01:41:06 [RateCDR] => 1 ) [2025-03-02 01: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-03-01 22:41:06' and `end` < '2025-03-02 01: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-03-02 01:41:18] Production.INFO: count ==554 [2025-03-02 01:41:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:41:06 - End Time 2025-03-02 01:41:06 [2025-03-02 01:41:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587829', 'tblTempUsageDetail_20' ) start [2025-03-02 01:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587829', 'tblTempUsageDetail_20' ) end [2025-03-02 01:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587829', 'tblTempVendorCDR_20' ) start [2025-03-02 01:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587829', 'tblTempVendorCDR_20' ) end [2025-03-02 01:41:18] Production.INFO: ProcessCDR(1,14587829,1,1,2) [2025-03-02 01:41:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587829,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:41:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587829,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:41:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587829,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:41:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587829,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:41:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587829', 'tblTempUsageDetail_20' ) start [2025-03-02 01:41:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587829', 'tblTempUsageDetail_20' ) end [2025-03-02 01:41:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:41:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:41:22] Production.INFO: ==19706== Releasing lock... [2025-03-02 01:41:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:41:22] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 01:42:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:42:06 [end_date_ymd] => 2025-03-02 01:42:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:42:06' and `end` < '2025-03-02 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-03-02 01:42:17] Production.INFO: count ==552 [2025-03-02 01:42:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:42:06 - End Time 2025-03-02 01:42:06 [2025-03-02 01:42:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587834', 'tblTempUsageDetail_20' ) start [2025-03-02 01:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587834', 'tblTempUsageDetail_20' ) end [2025-03-02 01:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587834', 'tblTempVendorCDR_20' ) start [2025-03-02 01:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587834', 'tblTempVendorCDR_20' ) end [2025-03-02 01:42:18] Production.INFO: ProcessCDR(1,14587834,1,1,2) [2025-03-02 01:42:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587834,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:42:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587834,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:42:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587834,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:42:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587834,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:42:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587834', 'tblTempUsageDetail_20' ) start [2025-03-02 01:42:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587834', 'tblTempUsageDetail_20' ) end [2025-03-02 01:42:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:42:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:42:21] Production.INFO: ==19783== Releasing lock... [2025-03-02 01:42:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:42:21] Production.INFO: 32.75 MB #Memory Used# [2025-03-02 01:43:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:43:06 [end_date_ymd] => 2025-03-02 01:43:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:43:06' and `end` < '2025-03-02 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-03-02 01:43:18] Production.INFO: count ==554 [2025-03-02 01:43:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:43:06 - End Time 2025-03-02 01:43:06 [2025-03-02 01:43:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587839', 'tblTempUsageDetail_20' ) start [2025-03-02 01:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587839', 'tblTempUsageDetail_20' ) end [2025-03-02 01:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587839', 'tblTempVendorCDR_20' ) start [2025-03-02 01:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587839', 'tblTempVendorCDR_20' ) end [2025-03-02 01:43:18] Production.INFO: ProcessCDR(1,14587839,1,1,2) [2025-03-02 01:43:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587839,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:43:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587839,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:43:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587839,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:43:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587839,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:43:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587839', 'tblTempUsageDetail_20' ) start [2025-03-02 01:43:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587839', 'tblTempUsageDetail_20' ) end [2025-03-02 01:43:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:43:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:43:22] Production.INFO: ==19862== Releasing lock... [2025-03-02 01:43:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:43:22] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 01:44:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:44:05 [end_date_ymd] => 2025-03-02 01:44:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:44:05' and `end` < '2025-03-02 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-03-02 01:44:17] Production.INFO: count ==553 [2025-03-02 01:44:17] Production.ERROR: pbx CDR StartTime 2025-03-01 22:44:05 - End Time 2025-03-02 01:44:05 [2025-03-02 01:44:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587844', 'tblTempUsageDetail_20' ) start [2025-03-02 01:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587844', 'tblTempUsageDetail_20' ) end [2025-03-02 01:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587844', 'tblTempVendorCDR_20' ) start [2025-03-02 01:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587844', 'tblTempVendorCDR_20' ) end [2025-03-02 01:44:18] Production.INFO: ProcessCDR(1,14587844,1,1,2) [2025-03-02 01:44:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587844,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:44:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587844,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:44:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587844,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:44:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587844,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587844', 'tblTempUsageDetail_20' ) start [2025-03-02 01:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587844', 'tblTempUsageDetail_20' ) end [2025-03-02 01:44:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:44:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:44:21] Production.INFO: ==19937== Releasing lock... [2025-03-02 01:44:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:44:21] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 01:45:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:45:06 [end_date_ymd] => 2025-03-02 01:45:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:45:06' and `end` < '2025-03-02 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-03-02 01:45:17] Production.INFO: count ==550 [2025-03-02 01:45:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:45:06 - End Time 2025-03-02 01:45:06 [2025-03-02 01:45:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:45:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587849', 'tblTempUsageDetail_20' ) start [2025-03-02 01:45:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587849', 'tblTempUsageDetail_20' ) end [2025-03-02 01:45:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587849', 'tblTempVendorCDR_20' ) start [2025-03-02 01:45:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587849', 'tblTempVendorCDR_20' ) end [2025-03-02 01:45:18] Production.INFO: ProcessCDR(1,14587849,1,1,2) [2025-03-02 01:45:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587849,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:45:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587849,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:45:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587849,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:45:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587849,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:45:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587849', 'tblTempUsageDetail_20' ) start [2025-03-02 01:45:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587849', 'tblTempUsageDetail_20' ) end [2025-03-02 01:45:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:45:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:45:21] Production.INFO: ==20015== Releasing lock... [2025-03-02 01:45:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:45:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 01:46:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:46:05 [end_date_ymd] => 2025-03-02 01:46:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:46:05' and `end` < '2025-03-02 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-03-02 01:46:17] Production.INFO: count ==545 [2025-03-02 01:46:17] Production.ERROR: pbx CDR StartTime 2025-03-01 22:46:05 - End Time 2025-03-02 01:46:05 [2025-03-02 01:46:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587854', 'tblTempUsageDetail_20' ) start [2025-03-02 01:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587854', 'tblTempUsageDetail_20' ) end [2025-03-02 01:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587854', 'tblTempVendorCDR_20' ) start [2025-03-02 01:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587854', 'tblTempVendorCDR_20' ) end [2025-03-02 01:46:17] Production.INFO: ProcessCDR(1,14587854,1,1,2) [2025-03-02 01:46:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587854,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:46:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587854,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:46:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587854,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:46:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587854,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587854', 'tblTempUsageDetail_20' ) start [2025-03-02 01:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587854', 'tblTempUsageDetail_20' ) end [2025-03-02 01:46:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:46:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:46:21] Production.INFO: ==20098== Releasing lock... [2025-03-02 01:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:46:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 01:47:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:47:06 [end_date_ymd] => 2025-03-02 01:47:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:47:06' and `end` < '2025-03-02 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-03-02 01:47:18] Production.INFO: count ==545 [2025-03-02 01:47:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:47:06 - End Time 2025-03-02 01:47:06 [2025-03-02 01:47:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587859', 'tblTempUsageDetail_20' ) start [2025-03-02 01:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587859', 'tblTempUsageDetail_20' ) end [2025-03-02 01:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587859', 'tblTempVendorCDR_20' ) start [2025-03-02 01:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587859', 'tblTempVendorCDR_20' ) end [2025-03-02 01:47:18] Production.INFO: ProcessCDR(1,14587859,1,1,2) [2025-03-02 01:47:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587859,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:47:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587859,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:47:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587859,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:47:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587859,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:47:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587859', 'tblTempUsageDetail_20' ) start [2025-03-02 01:47:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587859', 'tblTempUsageDetail_20' ) end [2025-03-02 01:47:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:47:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:47:23] Production.INFO: ==20176== Releasing lock... [2025-03-02 01:47:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:47:23] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 01:48:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:48:05 [end_date_ymd] => 2025-03-02 01:48:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:48:05' and `end` < '2025-03-02 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-03-02 01:48:18] Production.INFO: count ==538 [2025-03-02 01:48:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:48:05 - End Time 2025-03-02 01:48:05 [2025-03-02 01:48:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587864', 'tblTempUsageDetail_20' ) start [2025-03-02 01:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587864', 'tblTempUsageDetail_20' ) end [2025-03-02 01:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587864', 'tblTempVendorCDR_20' ) start [2025-03-02 01:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587864', 'tblTempVendorCDR_20' ) end [2025-03-02 01:48:18] Production.INFO: ProcessCDR(1,14587864,1,1,2) [2025-03-02 01:48:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587864,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:48:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587864,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:48:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587864,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:48:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587864,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:48:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587864', 'tblTempUsageDetail_20' ) start [2025-03-02 01:48:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587864', 'tblTempUsageDetail_20' ) end [2025-03-02 01:48:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:48:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:48:22] Production.INFO: ==20256== Releasing lock... [2025-03-02 01:48:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:48:22] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 01:49:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:49:06 [end_date_ymd] => 2025-03-02 01:49:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:49:06' and `end` < '2025-03-02 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-03-02 01:49:18] Production.INFO: count ==537 [2025-03-02 01:49:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:49:06 - End Time 2025-03-02 01:49:06 [2025-03-02 01:49:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587869', 'tblTempUsageDetail_20' ) start [2025-03-02 01:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587869', 'tblTempUsageDetail_20' ) end [2025-03-02 01:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587869', 'tblTempVendorCDR_20' ) start [2025-03-02 01:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587869', 'tblTempVendorCDR_20' ) end [2025-03-02 01:49:18] Production.INFO: ProcessCDR(1,14587869,1,1,2) [2025-03-02 01:49:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587869,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:49:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587869,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:49:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587869,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:49:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587869,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:49:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587869', 'tblTempUsageDetail_20' ) start [2025-03-02 01:49:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587869', 'tblTempUsageDetail_20' ) end [2025-03-02 01:49:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:49:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:49:21] Production.INFO: ==20339== Releasing lock... [2025-03-02 01:49:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:49:21] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 01:50:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:50:06 [end_date_ymd] => 2025-03-02 01:50:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:50:06' and `end` < '2025-03-02 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-03-02 01:50:18] Production.INFO: count ==545 [2025-03-02 01:50:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:50:06 - End Time 2025-03-02 01:50:06 [2025-03-02 01:50:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587874', 'tblTempUsageDetail_20' ) start [2025-03-02 01:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587874', 'tblTempUsageDetail_20' ) end [2025-03-02 01:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587874', 'tblTempVendorCDR_20' ) start [2025-03-02 01:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587874', 'tblTempVendorCDR_20' ) end [2025-03-02 01:50:18] Production.INFO: ProcessCDR(1,14587874,1,1,2) [2025-03-02 01:50:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587874,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:50:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587874,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:50:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587874,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:50:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587874,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:50:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587874', 'tblTempUsageDetail_20' ) start [2025-03-02 01:50:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587874', 'tblTempUsageDetail_20' ) end [2025-03-02 01:50:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:50:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:50:22] Production.INFO: ==20422== Releasing lock... [2025-03-02 01:50:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:50:22] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 01:51:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:51:06 [end_date_ymd] => 2025-03-02 01:51:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:51:06' and `end` < '2025-03-02 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-03-02 01:51:18] Production.INFO: count ==555 [2025-03-02 01:51:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:51:06 - End Time 2025-03-02 01:51:06 [2025-03-02 01:51:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587880', 'tblTempUsageDetail_20' ) start [2025-03-02 01:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587880', 'tblTempUsageDetail_20' ) end [2025-03-02 01:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587880', 'tblTempVendorCDR_20' ) start [2025-03-02 01:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587880', 'tblTempVendorCDR_20' ) end [2025-03-02 01:51:18] Production.INFO: ProcessCDR(1,14587880,1,1,2) [2025-03-02 01:51:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587880,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:51:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587880,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:51:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587880,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:51:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587880,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:51:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587880', 'tblTempUsageDetail_20' ) start [2025-03-02 01:51:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587880', 'tblTempUsageDetail_20' ) end [2025-03-02 01:51:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:51:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:51:23] Production.INFO: ==20497== Releasing lock... [2025-03-02 01:51:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:51:23] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 01:52:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:52:05 [end_date_ymd] => 2025-03-02 01:52:05 [RateCDR] => 1 ) [2025-03-02 01: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-03-01 22:52:05' and `end` < '2025-03-02 01: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-03-02 01:52:17] Production.INFO: count ==554 [2025-03-02 01:52:17] Production.ERROR: pbx CDR StartTime 2025-03-01 22:52:05 - End Time 2025-03-02 01:52:05 [2025-03-02 01:52:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587885', 'tblTempUsageDetail_20' ) start [2025-03-02 01:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587885', 'tblTempUsageDetail_20' ) end [2025-03-02 01:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587885', 'tblTempVendorCDR_20' ) start [2025-03-02 01:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587885', 'tblTempVendorCDR_20' ) end [2025-03-02 01:52:17] Production.INFO: ProcessCDR(1,14587885,1,1,2) [2025-03-02 01:52:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587885,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:52:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587885,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:52:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587885,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:52:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587885,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:52:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587885', 'tblTempUsageDetail_20' ) start [2025-03-02 01:52:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587885', 'tblTempUsageDetail_20' ) end [2025-03-02 01:52:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:52:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:52:21] Production.INFO: ==20573== Releasing lock... [2025-03-02 01:52:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:52:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 01:53:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:53:06 [end_date_ymd] => 2025-03-02 01:53:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:53:06' and `end` < '2025-03-02 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-03-02 01:53:17] Production.INFO: count ==553 [2025-03-02 01:53:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:53:06 - End Time 2025-03-02 01:53:06 [2025-03-02 01:53:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:53:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587890', 'tblTempUsageDetail_20' ) start [2025-03-02 01:53:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587890', 'tblTempUsageDetail_20' ) end [2025-03-02 01:53:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587890', 'tblTempVendorCDR_20' ) start [2025-03-02 01:53:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587890', 'tblTempVendorCDR_20' ) end [2025-03-02 01:53:18] Production.INFO: ProcessCDR(1,14587890,1,1,2) [2025-03-02 01:53:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587890,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:53:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587890,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:53:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587890,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:53:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587890,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587890', 'tblTempUsageDetail_20' ) start [2025-03-02 01:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587890', 'tblTempUsageDetail_20' ) end [2025-03-02 01:53:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:53:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:53:21] Production.INFO: ==20651== Releasing lock... [2025-03-02 01:53:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:53:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 01:54:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:54:05 [end_date_ymd] => 2025-03-02 01:54:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:54:05' and `end` < '2025-03-02 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-03-02 01:54:17] Production.INFO: count ==553 [2025-03-02 01:54:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:54:05 - End Time 2025-03-02 01:54:05 [2025-03-02 01:54:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587895', 'tblTempUsageDetail_20' ) start [2025-03-02 01:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587895', 'tblTempUsageDetail_20' ) end [2025-03-02 01:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587895', 'tblTempVendorCDR_20' ) start [2025-03-02 01:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587895', 'tblTempVendorCDR_20' ) end [2025-03-02 01:54:18] Production.INFO: ProcessCDR(1,14587895,1,1,2) [2025-03-02 01:54:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587895,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:54:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587895,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:54:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587895,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:54:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587895,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:54:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587895', 'tblTempUsageDetail_20' ) start [2025-03-02 01:54:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587895', 'tblTempUsageDetail_20' ) end [2025-03-02 01:54:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:54:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:54:21] Production.INFO: ==20725== Releasing lock... [2025-03-02 01:54:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:54:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 01:55:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:55:06 [end_date_ymd] => 2025-03-02 01:55:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:55:06' and `end` < '2025-03-02 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-03-02 01:55:18] Production.INFO: count ==557 [2025-03-02 01:55:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:55:06 - End Time 2025-03-02 01:55:06 [2025-03-02 01:55:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587900', 'tblTempUsageDetail_20' ) start [2025-03-02 01:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587900', 'tblTempUsageDetail_20' ) end [2025-03-02 01:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587900', 'tblTempVendorCDR_20' ) start [2025-03-02 01:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587900', 'tblTempVendorCDR_20' ) end [2025-03-02 01:55:18] Production.INFO: ProcessCDR(1,14587900,1,1,2) [2025-03-02 01:55:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587900,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:55:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587900,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:55:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587900,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:55:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587900,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587900', 'tblTempUsageDetail_20' ) start [2025-03-02 01:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587900', 'tblTempUsageDetail_20' ) end [2025-03-02 01:55:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:55:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:55:21] Production.INFO: ==20798== Releasing lock... [2025-03-02 01:55:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:55:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 01:56:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:56:06 [end_date_ymd] => 2025-03-02 01:56:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:56:06' and `end` < '2025-03-02 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-03-02 01:56:18] Production.INFO: count ==562 [2025-03-02 01:56:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:56:06 - End Time 2025-03-02 01:56:06 [2025-03-02 01:56:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587905', 'tblTempUsageDetail_20' ) start [2025-03-02 01:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587905', 'tblTempUsageDetail_20' ) end [2025-03-02 01:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587905', 'tblTempVendorCDR_20' ) start [2025-03-02 01:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587905', 'tblTempVendorCDR_20' ) end [2025-03-02 01:56:18] Production.INFO: ProcessCDR(1,14587905,1,1,2) [2025-03-02 01:56:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587905,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:56:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587905,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:56:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587905,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:56:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587905,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:56:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587905', 'tblTempUsageDetail_20' ) start [2025-03-02 01:56:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587905', 'tblTempUsageDetail_20' ) end [2025-03-02 01:56:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:56:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:56:23] Production.INFO: ==20929== Releasing lock... [2025-03-02 01:56:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:56:23] Production.INFO: 32 MB #Memory Used# [2025-03-02 01:57:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:57:06 [end_date_ymd] => 2025-03-02 01:57:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:57:06' and `end` < '2025-03-02 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-03-02 01:57:18] Production.INFO: count ==561 [2025-03-02 01:57:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:57:06 - End Time 2025-03-02 01:57:06 [2025-03-02 01:57:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587910', 'tblTempUsageDetail_20' ) start [2025-03-02 01:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587910', 'tblTempUsageDetail_20' ) end [2025-03-02 01:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587910', 'tblTempVendorCDR_20' ) start [2025-03-02 01:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587910', 'tblTempVendorCDR_20' ) end [2025-03-02 01:57:18] Production.INFO: ProcessCDR(1,14587910,1,1,2) [2025-03-02 01:57:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587910,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:57:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587910,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:57:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587910,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:57:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587910,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:57:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587910', 'tblTempUsageDetail_20' ) start [2025-03-02 01:57:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587910', 'tblTempUsageDetail_20' ) end [2025-03-02 01:57:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:57:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:57:22] Production.INFO: ==21021== Releasing lock... [2025-03-02 01:57:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:57:22] Production.INFO: 32 MB #Memory Used# [2025-03-02 01:58:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:58:05 [end_date_ymd] => 2025-03-02 01:58:05 [RateCDR] => 1 ) [2025-03-02 01: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-03-01 22:58:05' and `end` < '2025-03-02 01: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-03-02 01:58:17] Production.INFO: count ==561 [2025-03-02 01:58:17] Production.ERROR: pbx CDR StartTime 2025-03-01 22:58:05 - End Time 2025-03-02 01:58:05 [2025-03-02 01:58:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587915', 'tblTempUsageDetail_20' ) start [2025-03-02 01:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587915', 'tblTempUsageDetail_20' ) end [2025-03-02 01:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587915', 'tblTempVendorCDR_20' ) start [2025-03-02 01:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587915', 'tblTempVendorCDR_20' ) end [2025-03-02 01:58:17] Production.INFO: ProcessCDR(1,14587915,1,1,2) [2025-03-02 01:58:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587915,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:58:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587915,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:58:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587915,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:58:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587915,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:58:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587915', 'tblTempUsageDetail_20' ) start [2025-03-02 01:58:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587915', 'tblTempUsageDetail_20' ) end [2025-03-02 01:58:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:58:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:58:21] Production.INFO: ==21114== Releasing lock... [2025-03-02 01:58:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:58:21] Production.INFO: 32 MB #Memory Used# [2025-03-02 01:59:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 22:59:06 [end_date_ymd] => 2025-03-02 01:59:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 22:59:06' and `end` < '2025-03-02 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-03-02 01:59:18] Production.INFO: count ==561 [2025-03-02 01:59:18] Production.ERROR: pbx CDR StartTime 2025-03-01 22:59:06 - End Time 2025-03-02 01:59:06 [2025-03-02 01:59:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 01:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587920', 'tblTempUsageDetail_20' ) start [2025-03-02 01:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587920', 'tblTempUsageDetail_20' ) end [2025-03-02 01:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587920', 'tblTempVendorCDR_20' ) start [2025-03-02 01:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587920', 'tblTempVendorCDR_20' ) end [2025-03-02 01:59:18] Production.INFO: ProcessCDR(1,14587920,1,1,2) [2025-03-02 01:59:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587920,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:59:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587920,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 01:59:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587920,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:59:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587920,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 01:59:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587920', 'tblTempUsageDetail_20' ) start [2025-03-02 01:59:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587920', 'tblTempUsageDetail_20' ) end [2025-03-02 01:59:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 01:59:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 01:59:22] Production.INFO: ==21212== Releasing lock... [2025-03-02 01:59:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 01:59:22] Production.INFO: 32 MB #Memory Used# [2025-03-02 02:00:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:00:06 [end_date_ymd] => 2025-03-02 02:00:06 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:00:06' and `end` < '2025-03-02 02: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-03-02 02:00:18] Production.INFO: count ==576 [2025-03-02 02:00:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:00:06 - End Time 2025-03-02 02:00:06 [2025-03-02 02:00:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587925', 'tblTempUsageDetail_20' ) start [2025-03-02 02:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587925', 'tblTempUsageDetail_20' ) end [2025-03-02 02:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587925', 'tblTempVendorCDR_20' ) start [2025-03-02 02:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587925', 'tblTempVendorCDR_20' ) end [2025-03-02 02:00:18] Production.INFO: ProcessCDR(1,14587925,1,1,2) [2025-03-02 02:00:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587925,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:00:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587925,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:00:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587925,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:00:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587925,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:00:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587925', 'tblTempUsageDetail_20' ) start [2025-03-02 02:00:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587925', 'tblTempUsageDetail_20' ) end [2025-03-02 02:00:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:00:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:00:23] Production.INFO: ==21309== Releasing lock... [2025-03-02 02:00:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:00:23] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 02:01:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:01:06 [end_date_ymd] => 2025-03-02 02:01:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 23:01:06' and `end` < '2025-03-02 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-03-02 02:01:18] Production.INFO: count ==588 [2025-03-02 02:01:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:01:06 - End Time 2025-03-02 02:01:06 [2025-03-02 02:01:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587931', 'tblTempUsageDetail_20' ) start [2025-03-02 02:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587931', 'tblTempUsageDetail_20' ) end [2025-03-02 02:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587931', 'tblTempVendorCDR_20' ) start [2025-03-02 02:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587931', 'tblTempVendorCDR_20' ) end [2025-03-02 02:01:18] Production.INFO: ProcessCDR(1,14587931,1,1,2) [2025-03-02 02:01:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587931,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:01:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587931,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:01:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587931,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:01:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587931,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:01:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587931', 'tblTempUsageDetail_20' ) start [2025-03-02 02:01:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587931', 'tblTempUsageDetail_20' ) end [2025-03-02 02:01:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:01:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:01:22] Production.INFO: ==21524== Releasing lock... [2025-03-02 02:01:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:01:22] Production.INFO: 32 MB #Memory Used# [2025-03-02 02:02:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:02:05 [end_date_ymd] => 2025-03-02 02:02:05 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:02:05' and `end` < '2025-03-02 02: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-03-02 02:02:18] Production.INFO: count ==584 [2025-03-02 02:02:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:02:05 - End Time 2025-03-02 02:02:05 [2025-03-02 02:02:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587936', 'tblTempUsageDetail_20' ) start [2025-03-02 02:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587936', 'tblTempUsageDetail_20' ) end [2025-03-02 02:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587936', 'tblTempVendorCDR_20' ) start [2025-03-02 02:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587936', 'tblTempVendorCDR_20' ) end [2025-03-02 02:02:18] Production.INFO: ProcessCDR(1,14587936,1,1,2) [2025-03-02 02:02:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587936,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:02:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587936,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:02:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587936,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:02:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587936,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:02:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587936', 'tblTempUsageDetail_20' ) start [2025-03-02 02:02:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587936', 'tblTempUsageDetail_20' ) end [2025-03-02 02:02:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:02:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:02:21] Production.INFO: ==21617== Releasing lock... [2025-03-02 02:02:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:02:21] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 02:03:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:03:06 [end_date_ymd] => 2025-03-02 02:03:06 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:03:06' and `end` < '2025-03-02 02: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-03-02 02:03:18] Production.INFO: count ==584 [2025-03-02 02:03:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:03:06 - End Time 2025-03-02 02:03:06 [2025-03-02 02:03:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587941', 'tblTempUsageDetail_20' ) start [2025-03-02 02:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587941', 'tblTempUsageDetail_20' ) end [2025-03-02 02:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587941', 'tblTempVendorCDR_20' ) start [2025-03-02 02:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587941', 'tblTempVendorCDR_20' ) end [2025-03-02 02:03:18] Production.INFO: ProcessCDR(1,14587941,1,1,2) [2025-03-02 02:03:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587941,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:03:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587941,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:03:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587941,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:03:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587941,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:03:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587941', 'tblTempUsageDetail_20' ) start [2025-03-02 02:03:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587941', 'tblTempUsageDetail_20' ) end [2025-03-02 02:03:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:03:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:03:21] Production.INFO: ==21720== Releasing lock... [2025-03-02 02:03:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:03:21] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 02:04:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:04:05 [end_date_ymd] => 2025-03-02 02:04:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 23:04:05' and `end` < '2025-03-02 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-03-02 02:04:17] Production.INFO: count ==584 [2025-03-02 02:04:17] Production.ERROR: pbx CDR StartTime 2025-03-01 23:04:05 - End Time 2025-03-02 02:04:05 [2025-03-02 02:04:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587946', 'tblTempUsageDetail_20' ) start [2025-03-02 02:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587946', 'tblTempUsageDetail_20' ) end [2025-03-02 02:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587946', 'tblTempVendorCDR_20' ) start [2025-03-02 02:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587946', 'tblTempVendorCDR_20' ) end [2025-03-02 02:04:17] Production.INFO: ProcessCDR(1,14587946,1,1,2) [2025-03-02 02:04:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587946,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:04:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587946,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:04:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587946,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:04:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587946,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:04:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587946', 'tblTempUsageDetail_20' ) start [2025-03-02 02:04:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587946', 'tblTempUsageDetail_20' ) end [2025-03-02 02:04:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:04:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:04:21] Production.INFO: ==21819== Releasing lock... [2025-03-02 02:04:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:04:21] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 02:05:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:05:06 [end_date_ymd] => 2025-03-02 02:05:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 23:05:06' and `end` < '2025-03-02 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-03-02 02:05:18] Production.INFO: count ==584 [2025-03-02 02:05:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:05:06 - End Time 2025-03-02 02:05:06 [2025-03-02 02:05:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587951', 'tblTempUsageDetail_20' ) start [2025-03-02 02:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587951', 'tblTempUsageDetail_20' ) end [2025-03-02 02:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587951', 'tblTempVendorCDR_20' ) start [2025-03-02 02:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587951', 'tblTempVendorCDR_20' ) end [2025-03-02 02:05:18] Production.INFO: ProcessCDR(1,14587951,1,1,2) [2025-03-02 02:05:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587951,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:05:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587951,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:05:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587951,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:05:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587951,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:05:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587951', 'tblTempUsageDetail_20' ) start [2025-03-02 02:05:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587951', 'tblTempUsageDetail_20' ) end [2025-03-02 02:05:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:05:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:05:22] Production.INFO: ==21918== Releasing lock... [2025-03-02 02:05:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:05:22] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 02:06:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:06:06 [end_date_ymd] => 2025-03-02 02:06:06 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:06:06' and `end` < '2025-03-02 02: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-03-02 02:06:18] Production.INFO: count ==585 [2025-03-02 02:06:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:06:06 - End Time 2025-03-02 02:06:06 [2025-03-02 02:06:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:06:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587956', 'tblTempUsageDetail_20' ) start [2025-03-02 02:06:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587956', 'tblTempUsageDetail_20' ) end [2025-03-02 02:06:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587956', 'tblTempVendorCDR_20' ) start [2025-03-02 02:06:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587956', 'tblTempVendorCDR_20' ) end [2025-03-02 02:06:18] Production.INFO: ProcessCDR(1,14587956,1,1,2) [2025-03-02 02:06:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587956,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:06:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587956,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:06:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587956,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:06:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587956,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:06:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587956', 'tblTempUsageDetail_20' ) start [2025-03-02 02:06:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587956', 'tblTempUsageDetail_20' ) end [2025-03-02 02:06:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:06:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:06:21] Production.INFO: ==22014== Releasing lock... [2025-03-02 02:06:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:06:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 02:07:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:07:06 [end_date_ymd] => 2025-03-02 02:07:06 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:07:06' and `end` < '2025-03-02 02: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-03-02 02:07:18] Production.INFO: count ==588 [2025-03-02 02:07:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:07:06 - End Time 2025-03-02 02:07:06 [2025-03-02 02:07:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587961', 'tblTempUsageDetail_20' ) start [2025-03-02 02:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587961', 'tblTempUsageDetail_20' ) end [2025-03-02 02:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587961', 'tblTempVendorCDR_20' ) start [2025-03-02 02:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587961', 'tblTempVendorCDR_20' ) end [2025-03-02 02:07:18] Production.INFO: ProcessCDR(1,14587961,1,1,2) [2025-03-02 02:07:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587961,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:07:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587961,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:07:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587961,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:07:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587961,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:07:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587961', 'tblTempUsageDetail_20' ) start [2025-03-02 02:07:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587961', 'tblTempUsageDetail_20' ) end [2025-03-02 02:07:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:07:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:07:24] Production.INFO: ==22112== Releasing lock... [2025-03-02 02:07:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:07:24] Production.INFO: 32.5 MB #Memory Used# [2025-03-02 02:08:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:08:06 [end_date_ymd] => 2025-03-02 02:08:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 23:08:06' and `end` < '2025-03-02 02: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-03-02 02:08:18] Production.INFO: count ==587 [2025-03-02 02:08:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:08:06 - End Time 2025-03-02 02:08:06 [2025-03-02 02:08:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587966', 'tblTempUsageDetail_20' ) start [2025-03-02 02:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587966', 'tblTempUsageDetail_20' ) end [2025-03-02 02:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587966', 'tblTempVendorCDR_20' ) start [2025-03-02 02:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587966', 'tblTempVendorCDR_20' ) end [2025-03-02 02:08:18] Production.INFO: ProcessCDR(1,14587966,1,1,2) [2025-03-02 02:08:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587966,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:08:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587966,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:08:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587966,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:08:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587966,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:08:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587966', 'tblTempUsageDetail_20' ) start [2025-03-02 02:08:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587966', 'tblTempUsageDetail_20' ) end [2025-03-02 02:08:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:08:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:08:21] Production.INFO: ==22213== Releasing lock... [2025-03-02 02:08:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:08:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 02:09:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:09:06 [end_date_ymd] => 2025-03-02 02:09:06 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:09:06' and `end` < '2025-03-02 02: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-03-02 02:09:18] Production.INFO: count ==586 [2025-03-02 02:09:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:09:06 - End Time 2025-03-02 02:09:06 [2025-03-02 02:09:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587971', 'tblTempUsageDetail_20' ) start [2025-03-02 02:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587971', 'tblTempUsageDetail_20' ) end [2025-03-02 02:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587971', 'tblTempVendorCDR_20' ) start [2025-03-02 02:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587971', 'tblTempVendorCDR_20' ) end [2025-03-02 02:09:18] Production.INFO: ProcessCDR(1,14587971,1,1,2) [2025-03-02 02:09:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587971,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:09:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587971,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:09:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587971,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:09:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587971,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:09:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587971', 'tblTempUsageDetail_20' ) start [2025-03-02 02:09:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587971', 'tblTempUsageDetail_20' ) end [2025-03-02 02:09:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:09:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:09:22] Production.INFO: ==22312== Releasing lock... [2025-03-02 02:09:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:09:22] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 02:10:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:10:07 [end_date_ymd] => 2025-03-02 02:10:07 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:10:07' and `end` < '2025-03-02 02: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-03-02 02:10:19] Production.INFO: count ==597 [2025-03-02 02:10:19] Production.ERROR: pbx CDR StartTime 2025-03-01 23:10:07 - End Time 2025-03-02 02:10:07 [2025-03-02 02:10:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:10:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587976', 'tblTempUsageDetail_20' ) start [2025-03-02 02:10:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587976', 'tblTempUsageDetail_20' ) end [2025-03-02 02:10:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587976', 'tblTempVendorCDR_20' ) start [2025-03-02 02:10:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587976', 'tblTempVendorCDR_20' ) end [2025-03-02 02:10:19] Production.INFO: ProcessCDR(1,14587976,1,1,2) [2025-03-02 02:10:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587976,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:10:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587976,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:10:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587976,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:10:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587976,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:10:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587976', 'tblTempUsageDetail_20' ) start [2025-03-02 02:10:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587976', 'tblTempUsageDetail_20' ) end [2025-03-02 02:10:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:10:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:10:23] Production.INFO: ==22409== Releasing lock... [2025-03-02 02:10:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:10:23] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 02:11:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:11:05 [end_date_ymd] => 2025-03-02 02:11:05 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:11:05' and `end` < '2025-03-02 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-03-02 02:11:17] Production.INFO: count ==600 [2025-03-02 02:11:17] Production.ERROR: pbx CDR StartTime 2025-03-01 23:11:05 - End Time 2025-03-02 02:11:05 [2025-03-02 02:11:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587982', 'tblTempUsageDetail_20' ) start [2025-03-02 02:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587982', 'tblTempUsageDetail_20' ) end [2025-03-02 02:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587982', 'tblTempVendorCDR_20' ) start [2025-03-02 02:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587982', 'tblTempVendorCDR_20' ) end [2025-03-02 02:11:17] Production.INFO: ProcessCDR(1,14587982,1,1,2) [2025-03-02 02:11:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587982,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:11:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587982,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:11:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587982,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:11:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587982,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:11:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587982', 'tblTempUsageDetail_20' ) start [2025-03-02 02:11:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587982', 'tblTempUsageDetail_20' ) end [2025-03-02 02:11:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:11:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:11:21] Production.INFO: ==22509== Releasing lock... [2025-03-02 02:11:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:11:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 02:12:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:12:05 [end_date_ymd] => 2025-03-02 02:12:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 23:12:05' and `end` < '2025-03-02 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-03-02 02:12:17] Production.INFO: count ==600 [2025-03-02 02:12:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:12:05 - End Time 2025-03-02 02:12:05 [2025-03-02 02:12:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587987', 'tblTempUsageDetail_20' ) start [2025-03-02 02:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587987', 'tblTempUsageDetail_20' ) end [2025-03-02 02:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587987', 'tblTempVendorCDR_20' ) start [2025-03-02 02:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587987', 'tblTempVendorCDR_20' ) end [2025-03-02 02:12:18] Production.INFO: ProcessCDR(1,14587987,1,1,2) [2025-03-02 02:12:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587987,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:12:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587987,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:12:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587987,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:12:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587987,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:12:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587987', 'tblTempUsageDetail_20' ) start [2025-03-02 02:12:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587987', 'tblTempUsageDetail_20' ) end [2025-03-02 02:12:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:12:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:12:21] Production.INFO: ==22644== Releasing lock... [2025-03-02 02:12:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:12:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 02:13:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:13:06 [end_date_ymd] => 2025-03-02 02:13:06 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:13:06' and `end` < '2025-03-02 02: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-03-02 02:13:18] Production.INFO: count ==598 [2025-03-02 02:13:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:13:06 - End Time 2025-03-02 02:13:06 [2025-03-02 02:13:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587992', 'tblTempUsageDetail_20' ) start [2025-03-02 02:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587992', 'tblTempUsageDetail_20' ) end [2025-03-02 02:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587992', 'tblTempVendorCDR_20' ) start [2025-03-02 02:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587992', 'tblTempVendorCDR_20' ) end [2025-03-02 02:13:18] Production.INFO: ProcessCDR(1,14587992,1,1,2) [2025-03-02 02:13:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587992,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:13:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587992,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:13:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587992,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:13:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587992,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:13:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587992', 'tblTempUsageDetail_20' ) start [2025-03-02 02:13:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587992', 'tblTempUsageDetail_20' ) end [2025-03-02 02:13:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:13:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:13:21] Production.INFO: ==22742== Releasing lock... [2025-03-02 02:13:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:13:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 02:14:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:14:06 [end_date_ymd] => 2025-03-02 02:14:06 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:14:06' and `end` < '2025-03-02 02: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-03-02 02:14:18] Production.INFO: count ==597 [2025-03-02 02:14:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:14:06 - End Time 2025-03-02 02:14:06 [2025-03-02 02:14:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587997', 'tblTempUsageDetail_20' ) start [2025-03-02 02:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14587997', 'tblTempUsageDetail_20' ) end [2025-03-02 02:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587997', 'tblTempVendorCDR_20' ) start [2025-03-02 02:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14587997', 'tblTempVendorCDR_20' ) end [2025-03-02 02:14:18] Production.INFO: ProcessCDR(1,14587997,1,1,2) [2025-03-02 02:14:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14587997,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:14:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14587997,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:14:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14587997,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:14:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14587997,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:14:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587997', 'tblTempUsageDetail_20' ) start [2025-03-02 02:14:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14587997', 'tblTempUsageDetail_20' ) end [2025-03-02 02:14:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:14:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:14:21] Production.INFO: ==22837== Releasing lock... [2025-03-02 02:14:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:14:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 02:15:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:15:05 [end_date_ymd] => 2025-03-02 02:15:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 23:15:05' and `end` < '2025-03-02 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-03-02 02:15:17] Production.INFO: count ==591 [2025-03-02 02:15:17] Production.ERROR: pbx CDR StartTime 2025-03-01 23:15:05 - End Time 2025-03-02 02:15:05 [2025-03-02 02:15:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588002', 'tblTempUsageDetail_20' ) start [2025-03-02 02:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588002', 'tblTempUsageDetail_20' ) end [2025-03-02 02:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588002', 'tblTempVendorCDR_20' ) start [2025-03-02 02:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588002', 'tblTempVendorCDR_20' ) end [2025-03-02 02:15:17] Production.INFO: ProcessCDR(1,14588002,1,1,2) [2025-03-02 02:15:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588002,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:15:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588002,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:15:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588002,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:15:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588002,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:15:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588002', 'tblTempUsageDetail_20' ) start [2025-03-02 02:15:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588002', 'tblTempUsageDetail_20' ) end [2025-03-02 02:15:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:15:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:15:21] Production.INFO: ==22932== Releasing lock... [2025-03-02 02:15:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:15:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 02:16:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:16:05 [end_date_ymd] => 2025-03-02 02:16:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 23:16:05' and `end` < '2025-03-02 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-03-02 02:16:17] Production.INFO: count ==584 [2025-03-02 02:16:17] Production.ERROR: pbx CDR StartTime 2025-03-01 23:16:05 - End Time 2025-03-02 02:16:05 [2025-03-02 02:16:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588007', 'tblTempUsageDetail_20' ) start [2025-03-02 02:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588007', 'tblTempUsageDetail_20' ) end [2025-03-02 02:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588007', 'tblTempVendorCDR_20' ) start [2025-03-02 02:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588007', 'tblTempVendorCDR_20' ) end [2025-03-02 02:16:17] Production.INFO: ProcessCDR(1,14588007,1,1,2) [2025-03-02 02:16:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588007,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:16:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588007,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:16:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588007,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:16:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588007,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588007', 'tblTempUsageDetail_20' ) start [2025-03-02 02:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588007', 'tblTempUsageDetail_20' ) end [2025-03-02 02:16:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:16:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:16:21] Production.INFO: ==23034== Releasing lock... [2025-03-02 02:16:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:16:21] Production.INFO: 32 MB #Memory Used# [2025-03-02 02:17:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:17:06 [end_date_ymd] => 2025-03-02 02:17:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 23:17:06' and `end` < '2025-03-02 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-03-02 02:17:18] Production.INFO: count ==585 [2025-03-02 02:17:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:17:06 - End Time 2025-03-02 02:17:06 [2025-03-02 02:17:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588012', 'tblTempUsageDetail_20' ) start [2025-03-02 02:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588012', 'tblTempUsageDetail_20' ) end [2025-03-02 02:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588012', 'tblTempVendorCDR_20' ) start [2025-03-02 02:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588012', 'tblTempVendorCDR_20' ) end [2025-03-02 02:17:18] Production.INFO: ProcessCDR(1,14588012,1,1,2) [2025-03-02 02:17:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588012,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:17:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588012,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:17:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588012,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:17:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588012,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588012', 'tblTempUsageDetail_20' ) start [2025-03-02 02:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588012', 'tblTempUsageDetail_20' ) end [2025-03-02 02:17:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:17:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:17:21] Production.INFO: ==23134== Releasing lock... [2025-03-02 02:17:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:17:21] Production.INFO: 32 MB #Memory Used# [2025-03-02 02:18:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:18:05 [end_date_ymd] => 2025-03-02 02:18:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 23:18:05' and `end` < '2025-03-02 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-03-02 02:18:17] Production.INFO: count ==578 [2025-03-02 02:18:17] Production.ERROR: pbx CDR StartTime 2025-03-01 23:18:05 - End Time 2025-03-02 02:18:05 [2025-03-02 02:18:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588017', 'tblTempUsageDetail_20' ) start [2025-03-02 02:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588017', 'tblTempUsageDetail_20' ) end [2025-03-02 02:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588017', 'tblTempVendorCDR_20' ) start [2025-03-02 02:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588017', 'tblTempVendorCDR_20' ) end [2025-03-02 02:18:17] Production.INFO: ProcessCDR(1,14588017,1,1,2) [2025-03-02 02:18:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588017,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:18:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588017,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:18:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588017,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:18:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588017,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588017', 'tblTempUsageDetail_20' ) start [2025-03-02 02:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588017', 'tblTempUsageDetail_20' ) end [2025-03-02 02:18:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:18:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:18:21] Production.INFO: ==23227== Releasing lock... [2025-03-02 02:18:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:18:21] Production.INFO: 32 MB #Memory Used# [2025-03-02 02:19:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:19:06 [end_date_ymd] => 2025-03-02 02:19:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 23:19:06' and `end` < '2025-03-02 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-03-02 02:19:18] Production.INFO: count ==576 [2025-03-02 02:19:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:19:06 - End Time 2025-03-02 02:19:06 [2025-03-02 02:19:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588022', 'tblTempUsageDetail_20' ) start [2025-03-02 02:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588022', 'tblTempUsageDetail_20' ) end [2025-03-02 02:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588022', 'tblTempVendorCDR_20' ) start [2025-03-02 02:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588022', 'tblTempVendorCDR_20' ) end [2025-03-02 02:19:18] Production.INFO: ProcessCDR(1,14588022,1,1,2) [2025-03-02 02:19:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588022,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:19:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588022,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:19:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588022,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:19:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588022,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:19:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588022', 'tblTempUsageDetail_20' ) start [2025-03-02 02:19:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588022', 'tblTempUsageDetail_20' ) end [2025-03-02 02:19:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:19:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:19:21] Production.INFO: ==23328== Releasing lock... [2025-03-02 02:19:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:19:21] Production.INFO: 32 MB #Memory Used# [2025-03-02 02:20:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:20:06 [end_date_ymd] => 2025-03-02 02:20:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 23:20:06' and `end` < '2025-03-02 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-03-02 02:20:18] Production.INFO: count ==581 [2025-03-02 02:20:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:20:06 - End Time 2025-03-02 02:20:06 [2025-03-02 02:20:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588028', 'tblTempUsageDetail_20' ) start [2025-03-02 02:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588028', 'tblTempUsageDetail_20' ) end [2025-03-02 02:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588028', 'tblTempVendorCDR_20' ) start [2025-03-02 02:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588028', 'tblTempVendorCDR_20' ) end [2025-03-02 02:20:18] Production.INFO: ProcessCDR(1,14588028,1,1,2) [2025-03-02 02:20:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588028,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:20:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588028,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:20:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588028,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:20:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588028,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588028', 'tblTempUsageDetail_20' ) start [2025-03-02 02:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588028', 'tblTempUsageDetail_20' ) end [2025-03-02 02:20:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:20:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:20:22] Production.INFO: ==23405== Releasing lock... [2025-03-02 02:20:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:20:22] Production.INFO: 32 MB #Memory Used# [2025-03-02 02:21:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:21:05 [end_date_ymd] => 2025-03-02 02:21:05 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:21:05' and `end` < '2025-03-02 02: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-03-02 02:21:17] Production.INFO: count ==581 [2025-03-02 02:21:17] Production.ERROR: pbx CDR StartTime 2025-03-01 23:21:05 - End Time 2025-03-02 02:21:05 [2025-03-02 02:21:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588033', 'tblTempUsageDetail_20' ) start [2025-03-02 02:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588033', 'tblTempUsageDetail_20' ) end [2025-03-02 02:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588033', 'tblTempVendorCDR_20' ) start [2025-03-02 02:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588033', 'tblTempVendorCDR_20' ) end [2025-03-02 02:21:17] Production.INFO: ProcessCDR(1,14588033,1,1,2) [2025-03-02 02:21:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588033,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:21:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588033,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:21:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588033,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:21:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588033,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:21:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588033', 'tblTempUsageDetail_20' ) start [2025-03-02 02:21:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588033', 'tblTempUsageDetail_20' ) end [2025-03-02 02:21:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:21:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:21:21] Production.INFO: ==23484== Releasing lock... [2025-03-02 02:21:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:21:21] Production.INFO: 32 MB #Memory Used# [2025-03-02 02:22:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:22:05 [end_date_ymd] => 2025-03-02 02:22:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 23:22:05' and `end` < '2025-03-02 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-03-02 02:22:17] Production.INFO: count ==581 [2025-03-02 02:22:17] Production.ERROR: pbx CDR StartTime 2025-03-01 23:22:05 - End Time 2025-03-02 02:22:05 [2025-03-02 02:22:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588038', 'tblTempUsageDetail_20' ) start [2025-03-02 02:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588038', 'tblTempUsageDetail_20' ) end [2025-03-02 02:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588038', 'tblTempVendorCDR_20' ) start [2025-03-02 02:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588038', 'tblTempVendorCDR_20' ) end [2025-03-02 02:22:17] Production.INFO: ProcessCDR(1,14588038,1,1,2) [2025-03-02 02:22:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588038,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:22:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588038,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:22:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588038,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:22:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588038,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:22:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588038', 'tblTempUsageDetail_20' ) start [2025-03-02 02:22:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588038', 'tblTempUsageDetail_20' ) end [2025-03-02 02:22:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:22:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:22:20] Production.INFO: ==23558== Releasing lock... [2025-03-02 02:22:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:22:20] Production.INFO: 32 MB #Memory Used# [2025-03-02 02:23:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:23:06 [end_date_ymd] => 2025-03-02 02:23:06 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:23:06' and `end` < '2025-03-02 02: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-03-02 02:23:18] Production.INFO: count ==581 [2025-03-02 02:23:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:23:06 - End Time 2025-03-02 02:23:06 [2025-03-02 02:23:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:23:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588043', 'tblTempUsageDetail_20' ) start [2025-03-02 02:23:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588043', 'tblTempUsageDetail_20' ) end [2025-03-02 02:23:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588043', 'tblTempVendorCDR_20' ) start [2025-03-02 02:23:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588043', 'tblTempVendorCDR_20' ) end [2025-03-02 02:23:18] Production.INFO: ProcessCDR(1,14588043,1,1,2) [2025-03-02 02:23:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588043,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:23:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588043,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:23:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588043,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:23:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588043,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:23:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588043', 'tblTempUsageDetail_20' ) start [2025-03-02 02:23:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588043', 'tblTempUsageDetail_20' ) end [2025-03-02 02:23:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:23:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:23:21] Production.INFO: ==23637== Releasing lock... [2025-03-02 02:23:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:23:21] Production.INFO: 32 MB #Memory Used# [2025-03-02 02:24:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:24:05 [end_date_ymd] => 2025-03-02 02:24:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 23:24:05' and `end` < '2025-03-02 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-03-02 02:24:17] Production.INFO: count ==577 [2025-03-02 02:24:17] Production.ERROR: pbx CDR StartTime 2025-03-01 23:24:05 - End Time 2025-03-02 02:24:05 [2025-03-02 02:24:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588048', 'tblTempUsageDetail_20' ) start [2025-03-02 02:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588048', 'tblTempUsageDetail_20' ) end [2025-03-02 02:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588048', 'tblTempVendorCDR_20' ) start [2025-03-02 02:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588048', 'tblTempVendorCDR_20' ) end [2025-03-02 02:24:17] Production.INFO: ProcessCDR(1,14588048,1,1,2) [2025-03-02 02:24:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588048,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:24:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588048,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:24:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588048,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:24:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588048,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:24:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588048', 'tblTempUsageDetail_20' ) start [2025-03-02 02:24:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588048', 'tblTempUsageDetail_20' ) end [2025-03-02 02:24:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:24:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:24:20] Production.INFO: ==23715== Releasing lock... [2025-03-02 02:24:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:24:20] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 02:25:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:25:06 [end_date_ymd] => 2025-03-02 02:25:06 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:25:06' and `end` < '2025-03-02 02: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-03-02 02:25:18] Production.INFO: count ==577 [2025-03-02 02:25:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:25:06 - End Time 2025-03-02 02:25:06 [2025-03-02 02:25:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588053', 'tblTempUsageDetail_20' ) start [2025-03-02 02:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588053', 'tblTempUsageDetail_20' ) end [2025-03-02 02:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588053', 'tblTempVendorCDR_20' ) start [2025-03-02 02:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588053', 'tblTempVendorCDR_20' ) end [2025-03-02 02:25:18] Production.INFO: ProcessCDR(1,14588053,1,1,2) [2025-03-02 02:25:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588053,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:25:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588053,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:25:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588053,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:25:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588053,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588053', 'tblTempUsageDetail_20' ) start [2025-03-02 02:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588053', 'tblTempUsageDetail_20' ) end [2025-03-02 02:25:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:25:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:25:21] Production.INFO: ==23791== Releasing lock... [2025-03-02 02:25:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:25:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 02:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:26:05 [end_date_ymd] => 2025-03-02 02:26:05 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:26:05' and `end` < '2025-03-02 02: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-03-02 02:26:17] Production.INFO: count ==572 [2025-03-02 02:26:17] Production.ERROR: pbx CDR StartTime 2025-03-01 23:26:05 - End Time 2025-03-02 02:26:05 [2025-03-02 02:26:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588058', 'tblTempUsageDetail_20' ) start [2025-03-02 02:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588058', 'tblTempUsageDetail_20' ) end [2025-03-02 02:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588058', 'tblTempVendorCDR_20' ) start [2025-03-02 02:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588058', 'tblTempVendorCDR_20' ) end [2025-03-02 02:26:17] Production.INFO: ProcessCDR(1,14588058,1,1,2) [2025-03-02 02:26:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588058,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:26:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588058,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:26:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588058,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:26:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588058,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:26:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588058', 'tblTempUsageDetail_20' ) start [2025-03-02 02:26:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588058', 'tblTempUsageDetail_20' ) end [2025-03-02 02:26:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:26:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:26:21] Production.INFO: ==23864== Releasing lock... [2025-03-02 02:26:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:26:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 02:27:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:27:06 [end_date_ymd] => 2025-03-02 02:27:06 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:27:06' and `end` < '2025-03-02 02: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-03-02 02:27:18] Production.INFO: count ==571 [2025-03-02 02:27:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:27:06 - End Time 2025-03-02 02:27:06 [2025-03-02 02:27:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:27:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588063', 'tblTempUsageDetail_20' ) start [2025-03-02 02:27:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588063', 'tblTempUsageDetail_20' ) end [2025-03-02 02:27:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588063', 'tblTempVendorCDR_20' ) start [2025-03-02 02:27:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588063', 'tblTempVendorCDR_20' ) end [2025-03-02 02:27:18] Production.INFO: ProcessCDR(1,14588063,1,1,2) [2025-03-02 02:27:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588063,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:27:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588063,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:27:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588063,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:27:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588063,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:27:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588063', 'tblTempUsageDetail_20' ) start [2025-03-02 02:27:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588063', 'tblTempUsageDetail_20' ) end [2025-03-02 02:27:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:27:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:27:21] Production.INFO: ==23981== Releasing lock... [2025-03-02 02:27:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:27:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 02:28:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:28:06 [end_date_ymd] => 2025-03-02 02:28:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 23:28:06' and `end` < '2025-03-02 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-03-02 02:28:18] Production.INFO: count ==571 [2025-03-02 02:28:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:28:06 - End Time 2025-03-02 02:28:06 [2025-03-02 02:28:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588068', 'tblTempUsageDetail_20' ) start [2025-03-02 02:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588068', 'tblTempUsageDetail_20' ) end [2025-03-02 02:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588068', 'tblTempVendorCDR_20' ) start [2025-03-02 02:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588068', 'tblTempVendorCDR_20' ) end [2025-03-02 02:28:18] Production.INFO: ProcessCDR(1,14588068,1,1,2) [2025-03-02 02:28:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588068,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:28:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588068,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:28:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588068,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:28:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588068,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:28:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588068', 'tblTempUsageDetail_20' ) start [2025-03-02 02:28:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588068', 'tblTempUsageDetail_20' ) end [2025-03-02 02:28:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:28:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:28:21] Production.INFO: ==24056== Releasing lock... [2025-03-02 02:28:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:28:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 02:29:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:29:06 [end_date_ymd] => 2025-03-02 02:29:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 23:29:06' and `end` < '2025-03-02 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-03-02 02:29:17] Production.INFO: count ==571 [2025-03-02 02:29:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:29:06 - End Time 2025-03-02 02:29:06 [2025-03-02 02:29:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588073', 'tblTempUsageDetail_20' ) start [2025-03-02 02:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588073', 'tblTempUsageDetail_20' ) end [2025-03-02 02:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588073', 'tblTempVendorCDR_20' ) start [2025-03-02 02:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588073', 'tblTempVendorCDR_20' ) end [2025-03-02 02:29:18] Production.INFO: ProcessCDR(1,14588073,1,1,2) [2025-03-02 02:29:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588073,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:29:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588073,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:29:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588073,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:29:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588073,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:29:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588073', 'tblTempUsageDetail_20' ) start [2025-03-02 02:29:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588073', 'tblTempUsageDetail_20' ) end [2025-03-02 02:29:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:29:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:29:21] Production.INFO: ==24137== Releasing lock... [2025-03-02 02:29:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:29:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 02:30:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:30:06 [end_date_ymd] => 2025-03-02 02:30:06 [RateCDR] => 1 ) [2025-03-02 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-03-01 23:30:06' and `end` < '2025-03-02 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-03-02 02:30:18] Production.INFO: count ==581 [2025-03-02 02:30:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:30:06 - End Time 2025-03-02 02:30:06 [2025-03-02 02:30:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588078', 'tblTempUsageDetail_20' ) start [2025-03-02 02:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588078', 'tblTempUsageDetail_20' ) end [2025-03-02 02:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588078', 'tblTempVendorCDR_20' ) start [2025-03-02 02:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588078', 'tblTempVendorCDR_20' ) end [2025-03-02 02:30:18] Production.INFO: ProcessCDR(1,14588078,1,1,2) [2025-03-02 02:30:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588078,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:30:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588078,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:30:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588078,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:30:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588078,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:30:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588078', 'tblTempUsageDetail_20' ) start [2025-03-02 02:30:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588078', 'tblTempUsageDetail_20' ) end [2025-03-02 02:30:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:30:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:30:21] Production.INFO: ==24219== Releasing lock... [2025-03-02 02:30:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:30:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 02:31:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:31:06 [end_date_ymd] => 2025-03-02 02:31:06 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:31:06' and `end` < '2025-03-02 02: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-03-02 02:31:18] Production.INFO: count ==588 [2025-03-02 02:31:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:31:06 - End Time 2025-03-02 02:31:06 [2025-03-02 02:31:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588084', 'tblTempUsageDetail_20' ) start [2025-03-02 02:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588084', 'tblTempUsageDetail_20' ) end [2025-03-02 02:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588084', 'tblTempVendorCDR_20' ) start [2025-03-02 02:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588084', 'tblTempVendorCDR_20' ) end [2025-03-02 02:31:18] Production.INFO: ProcessCDR(1,14588084,1,1,2) [2025-03-02 02:31:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588084,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:31:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588084,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:31:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588084,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:31:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588084,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:31:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588084', 'tblTempUsageDetail_20' ) start [2025-03-02 02:31:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588084', 'tblTempUsageDetail_20' ) end [2025-03-02 02:31:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:31:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:31:21] Production.INFO: ==24292== Releasing lock... [2025-03-02 02:31:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:31:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 02:32:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:32:05 [end_date_ymd] => 2025-03-02 02:32:05 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:32:05' and `end` < '2025-03-02 02: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-03-02 02:32:17] Production.INFO: count ==588 [2025-03-02 02:32:17] Production.ERROR: pbx CDR StartTime 2025-03-01 23:32:05 - End Time 2025-03-02 02:32:05 [2025-03-02 02:32:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588089', 'tblTempUsageDetail_20' ) start [2025-03-02 02:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588089', 'tblTempUsageDetail_20' ) end [2025-03-02 02:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588089', 'tblTempVendorCDR_20' ) start [2025-03-02 02:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588089', 'tblTempVendorCDR_20' ) end [2025-03-02 02:32:17] Production.INFO: ProcessCDR(1,14588089,1,1,2) [2025-03-02 02:32:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588089,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:32:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588089,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:32:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588089,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:32:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588089,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:32:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588089', 'tblTempUsageDetail_20' ) start [2025-03-02 02:32:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588089', 'tblTempUsageDetail_20' ) end [2025-03-02 02:32:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:32:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:32:21] Production.INFO: ==24366== Releasing lock... [2025-03-02 02:32:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:32:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 02:33:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:33:05 [end_date_ymd] => 2025-03-02 02:33:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 23:33:05' and `end` < '2025-03-02 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-03-02 02:33:17] Production.INFO: count ==588 [2025-03-02 02:33:17] Production.ERROR: pbx CDR StartTime 2025-03-01 23:33:05 - End Time 2025-03-02 02:33:05 [2025-03-02 02:33:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588094', 'tblTempUsageDetail_20' ) start [2025-03-02 02:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588094', 'tblTempUsageDetail_20' ) end [2025-03-02 02:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588094', 'tblTempVendorCDR_20' ) start [2025-03-02 02:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588094', 'tblTempVendorCDR_20' ) end [2025-03-02 02:33:17] Production.INFO: ProcessCDR(1,14588094,1,1,2) [2025-03-02 02:33:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588094,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:33:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588094,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:33:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588094,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:33:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588094,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:33:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588094', 'tblTempUsageDetail_20' ) start [2025-03-02 02:33:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588094', 'tblTempUsageDetail_20' ) end [2025-03-02 02:33:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:33:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:33:21] Production.INFO: ==24443== Releasing lock... [2025-03-02 02:33:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:33:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 02:34:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:34:05 [end_date_ymd] => 2025-03-02 02:34:05 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:34:05' and `end` < '2025-03-02 02: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-03-02 02:34:17] Production.INFO: count ==588 [2025-03-02 02:34:17] Production.ERROR: pbx CDR StartTime 2025-03-01 23:34:05 - End Time 2025-03-02 02:34:05 [2025-03-02 02:34:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588099', 'tblTempUsageDetail_20' ) start [2025-03-02 02:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588099', 'tblTempUsageDetail_20' ) end [2025-03-02 02:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588099', 'tblTempVendorCDR_20' ) start [2025-03-02 02:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588099', 'tblTempVendorCDR_20' ) end [2025-03-02 02:34:17] Production.INFO: ProcessCDR(1,14588099,1,1,2) [2025-03-02 02:34:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588099,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:34:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588099,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:34:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588099,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:34:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588099,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:34:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588099', 'tblTempUsageDetail_20' ) start [2025-03-02 02:34:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588099', 'tblTempUsageDetail_20' ) end [2025-03-02 02:34:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:34:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:34:20] Production.INFO: ==24522== Releasing lock... [2025-03-02 02:34:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:34:20] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 02:35:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:35:06 [end_date_ymd] => 2025-03-02 02:35:06 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:35:06' and `end` < '2025-03-02 02: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-03-02 02:35:17] Production.INFO: count ==588 [2025-03-02 02:35:17] Production.ERROR: pbx CDR StartTime 2025-03-01 23:35:06 - End Time 2025-03-02 02:35:06 [2025-03-02 02:35:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588104', 'tblTempUsageDetail_20' ) start [2025-03-02 02:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588104', 'tblTempUsageDetail_20' ) end [2025-03-02 02:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588104', 'tblTempVendorCDR_20' ) start [2025-03-02 02:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588104', 'tblTempVendorCDR_20' ) end [2025-03-02 02:35:17] Production.INFO: ProcessCDR(1,14588104,1,1,2) [2025-03-02 02:35:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588104,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:35:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588104,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:35:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588104,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:35:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588104,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:35:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588104', 'tblTempUsageDetail_20' ) start [2025-03-02 02:35:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588104', 'tblTempUsageDetail_20' ) end [2025-03-02 02:35:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:35:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:35:21] Production.INFO: ==24598== Releasing lock... [2025-03-02 02:35:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:35:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 02:36:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:36:05 [end_date_ymd] => 2025-03-02 02:36:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 23:36:05' and `end` < '2025-03-02 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-03-02 02:36:17] Production.INFO: count ==585 [2025-03-02 02:36:17] Production.ERROR: pbx CDR StartTime 2025-03-01 23:36:05 - End Time 2025-03-02 02:36:05 [2025-03-02 02:36:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588109', 'tblTempUsageDetail_20' ) start [2025-03-02 02:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588109', 'tblTempUsageDetail_20' ) end [2025-03-02 02:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588109', 'tblTempVendorCDR_20' ) start [2025-03-02 02:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588109', 'tblTempVendorCDR_20' ) end [2025-03-02 02:36:17] Production.INFO: ProcessCDR(1,14588109,1,1,2) [2025-03-02 02:36:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588109,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:36:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588109,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:36:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588109,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:36:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588109,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:36:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588109', 'tblTempUsageDetail_20' ) start [2025-03-02 02:36:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588109', 'tblTempUsageDetail_20' ) end [2025-03-02 02:36:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:36:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:36:20] Production.INFO: ==24672== Releasing lock... [2025-03-02 02:36:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:36:20] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 02:37:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:37:05 [end_date_ymd] => 2025-03-02 02:37:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 23:37:05' and `end` < '2025-03-02 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-03-02 02:37:17] Production.INFO: count ==585 [2025-03-02 02:37:17] Production.ERROR: pbx CDR StartTime 2025-03-01 23:37:05 - End Time 2025-03-02 02:37:05 [2025-03-02 02:37:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588114', 'tblTempUsageDetail_20' ) start [2025-03-02 02:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588114', 'tblTempUsageDetail_20' ) end [2025-03-02 02:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588114', 'tblTempVendorCDR_20' ) start [2025-03-02 02:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588114', 'tblTempVendorCDR_20' ) end [2025-03-02 02:37:17] Production.INFO: ProcessCDR(1,14588114,1,1,2) [2025-03-02 02:37:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588114,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:37:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588114,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:37:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588114,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:37:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588114,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588114', 'tblTempUsageDetail_20' ) start [2025-03-02 02:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588114', 'tblTempUsageDetail_20' ) end [2025-03-02 02:37:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:37:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:37:21] Production.INFO: ==24746== Releasing lock... [2025-03-02 02:37:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:37:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 02:38:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:38:05 [end_date_ymd] => 2025-03-02 02:38:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 23:38:05' and `end` < '2025-03-02 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-03-02 02:38:17] Production.INFO: count ==585 [2025-03-02 02:38:17] Production.ERROR: pbx CDR StartTime 2025-03-01 23:38:05 - End Time 2025-03-02 02:38:05 [2025-03-02 02:38:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588119', 'tblTempUsageDetail_20' ) start [2025-03-02 02:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588119', 'tblTempUsageDetail_20' ) end [2025-03-02 02:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588119', 'tblTempVendorCDR_20' ) start [2025-03-02 02:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588119', 'tblTempVendorCDR_20' ) end [2025-03-02 02:38:17] Production.INFO: ProcessCDR(1,14588119,1,1,2) [2025-03-02 02:38:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588119,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:38:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588119,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:38:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588119,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:38:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588119,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588119', 'tblTempUsageDetail_20' ) start [2025-03-02 02:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588119', 'tblTempUsageDetail_20' ) end [2025-03-02 02:38:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:38:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:38:21] Production.INFO: ==24825== Releasing lock... [2025-03-02 02:38:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:38:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 02:39:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:39:05 [end_date_ymd] => 2025-03-02 02:39:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 23:39:05' and `end` < '2025-03-02 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-03-02 02:39:17] Production.INFO: count ==584 [2025-03-02 02:39:17] Production.ERROR: pbx CDR StartTime 2025-03-01 23:39:05 - End Time 2025-03-02 02:39:05 [2025-03-02 02:39:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588124', 'tblTempUsageDetail_20' ) start [2025-03-02 02:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588124', 'tblTempUsageDetail_20' ) end [2025-03-02 02:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588124', 'tblTempVendorCDR_20' ) start [2025-03-02 02:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588124', 'tblTempVendorCDR_20' ) end [2025-03-02 02:39:17] Production.INFO: ProcessCDR(1,14588124,1,1,2) [2025-03-02 02:39:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588124,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:39:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588124,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:39:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588124,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:39:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588124,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:39:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588124', 'tblTempUsageDetail_20' ) start [2025-03-02 02:39:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588124', 'tblTempUsageDetail_20' ) end [2025-03-02 02:39:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:39:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:39:20] Production.INFO: ==24903== Releasing lock... [2025-03-02 02:39:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:39:20] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 02:40:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:40:06 [end_date_ymd] => 2025-03-02 02:40:06 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:40:06' and `end` < '2025-03-02 02: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-03-02 02:40:18] Production.INFO: count ==592 [2025-03-02 02:40:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:40:06 - End Time 2025-03-02 02:40:06 [2025-03-02 02:40:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588130', 'tblTempUsageDetail_20' ) start [2025-03-02 02:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588130', 'tblTempUsageDetail_20' ) end [2025-03-02 02:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588130', 'tblTempVendorCDR_20' ) start [2025-03-02 02:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588130', 'tblTempVendorCDR_20' ) end [2025-03-02 02:40:18] Production.INFO: ProcessCDR(1,14588130,1,1,2) [2025-03-02 02:40:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588130,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:40:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588130,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:40:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588130,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:40:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588130,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:40:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588130', 'tblTempUsageDetail_20' ) start [2025-03-02 02:40:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588130', 'tblTempUsageDetail_20' ) end [2025-03-02 02:40:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:40:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:40:21] Production.INFO: ==24984== Releasing lock... [2025-03-02 02:40:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:40:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 02:41:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:41:05 [end_date_ymd] => 2025-03-02 02:41:05 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:41:05' and `end` < '2025-03-02 02: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-03-02 02:41:17] Production.INFO: count ==595 [2025-03-02 02:41:17] Production.ERROR: pbx CDR StartTime 2025-03-01 23:41:05 - End Time 2025-03-02 02:41:05 [2025-03-02 02:41:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588135', 'tblTempUsageDetail_20' ) start [2025-03-02 02:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588135', 'tblTempUsageDetail_20' ) end [2025-03-02 02:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588135', 'tblTempVendorCDR_20' ) start [2025-03-02 02:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588135', 'tblTempVendorCDR_20' ) end [2025-03-02 02:41:17] Production.INFO: ProcessCDR(1,14588135,1,1,2) [2025-03-02 02:41:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588135,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:41:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588135,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:41:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588135,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:41:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588135,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:41:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588135', 'tblTempUsageDetail_20' ) start [2025-03-02 02:41:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588135', 'tblTempUsageDetail_20' ) end [2025-03-02 02:41:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:41:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:41:21] Production.INFO: ==25063== Releasing lock... [2025-03-02 02:41:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:41:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 02:42:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:42:05 [end_date_ymd] => 2025-03-02 02:42:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 23:42:05' and `end` < '2025-03-02 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-03-02 02:42:17] Production.INFO: count ==598 [2025-03-02 02:42:17] Production.ERROR: pbx CDR StartTime 2025-03-01 23:42:05 - End Time 2025-03-02 02:42:05 [2025-03-02 02:42:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588140', 'tblTempUsageDetail_20' ) start [2025-03-02 02:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588140', 'tblTempUsageDetail_20' ) end [2025-03-02 02:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588140', 'tblTempVendorCDR_20' ) start [2025-03-02 02:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588140', 'tblTempVendorCDR_20' ) end [2025-03-02 02:42:17] Production.INFO: ProcessCDR(1,14588140,1,1,2) [2025-03-02 02:42:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588140,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:42:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588140,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:42:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588140,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:42:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588140,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:42:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588140', 'tblTempUsageDetail_20' ) start [2025-03-02 02:42:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588140', 'tblTempUsageDetail_20' ) end [2025-03-02 02:42:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:42:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:42:20] Production.INFO: ==25178== Releasing lock... [2025-03-02 02:42:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:42:20] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 02:43:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:43:05 [end_date_ymd] => 2025-03-02 02:43:05 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:43:05' and `end` < '2025-03-02 02: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-03-02 02:43:17] Production.INFO: count ==598 [2025-03-02 02:43:17] Production.ERROR: pbx CDR StartTime 2025-03-01 23:43:05 - End Time 2025-03-02 02:43:05 [2025-03-02 02:43:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588142', 'tblTempUsageDetail_20' ) start [2025-03-02 02:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588142', 'tblTempUsageDetail_20' ) end [2025-03-02 02:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588142', 'tblTempVendorCDR_20' ) start [2025-03-02 02:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588142', 'tblTempVendorCDR_20' ) end [2025-03-02 02:43:17] Production.INFO: ProcessCDR(1,14588142,1,1,2) [2025-03-02 02:43:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588142,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:43:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588142,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:43:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588142,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:43:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588142,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:43:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588142', 'tblTempUsageDetail_20' ) start [2025-03-02 02:43:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588142', 'tblTempUsageDetail_20' ) end [2025-03-02 02:43:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:43:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:43:20] Production.INFO: ==25259== Releasing lock... [2025-03-02 02:43:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:43:20] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 02:44:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:44:06 [end_date_ymd] => 2025-03-02 02:44:06 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:44:06' and `end` < '2025-03-02 02: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-03-02 02:44:18] Production.INFO: count ==597 [2025-03-02 02:44:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:44:06 - End Time 2025-03-02 02:44:06 [2025-03-02 02:44:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588150', 'tblTempUsageDetail_20' ) start [2025-03-02 02:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588150', 'tblTempUsageDetail_20' ) end [2025-03-02 02:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588150', 'tblTempVendorCDR_20' ) start [2025-03-02 02:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588150', 'tblTempVendorCDR_20' ) end [2025-03-02 02:44:18] Production.INFO: ProcessCDR(1,14588150,1,1,2) [2025-03-02 02:44:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588150,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:44:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588150,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:44:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588150,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:44:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588150,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:44:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588150', 'tblTempUsageDetail_20' ) start [2025-03-02 02:44:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588150', 'tblTempUsageDetail_20' ) end [2025-03-02 02:44:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:44:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:44:22] Production.INFO: ==25338== Releasing lock... [2025-03-02 02:44:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:44:22] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 02:45:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:45:05 [end_date_ymd] => 2025-03-02 02:45:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 23:45:05' and `end` < '2025-03-02 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-03-02 02:45:17] Production.INFO: count ==604 [2025-03-02 02:45:17] Production.ERROR: pbx CDR StartTime 2025-03-01 23:45:05 - End Time 2025-03-02 02:45:05 [2025-03-02 02:45:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588155', 'tblTempUsageDetail_20' ) start [2025-03-02 02:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588155', 'tblTempUsageDetail_20' ) end [2025-03-02 02:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588155', 'tblTempVendorCDR_20' ) start [2025-03-02 02:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588155', 'tblTempVendorCDR_20' ) end [2025-03-02 02:45:17] Production.INFO: ProcessCDR(1,14588155,1,1,2) [2025-03-02 02:45:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588155,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:45:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588155,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:45:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588155,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:45:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588155,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:45:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588155', 'tblTempUsageDetail_20' ) start [2025-03-02 02:45:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588155', 'tblTempUsageDetail_20' ) end [2025-03-02 02:45:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:45:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:45:20] Production.INFO: ==25414== Releasing lock... [2025-03-02 02:45:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:45:20] Production.INFO: 32 MB #Memory Used# [2025-03-02 02:46:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:46:06 [end_date_ymd] => 2025-03-02 02:46:06 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:46:06' and `end` < '2025-03-02 02: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-03-02 02:46:17] Production.INFO: count ==615 [2025-03-02 02:46:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:46:06 - End Time 2025-03-02 02:46:06 [2025-03-02 02:46:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588160', 'tblTempUsageDetail_20' ) start [2025-03-02 02:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588160', 'tblTempUsageDetail_20' ) end [2025-03-02 02:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588160', 'tblTempVendorCDR_20' ) start [2025-03-02 02:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588160', 'tblTempVendorCDR_20' ) end [2025-03-02 02:46:18] Production.INFO: ProcessCDR(1,14588160,1,1,2) [2025-03-02 02:46:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588160,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:46:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588160,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:46:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588160,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:46:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588160,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:46:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588160', 'tblTempUsageDetail_20' ) start [2025-03-02 02:46:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588160', 'tblTempUsageDetail_20' ) end [2025-03-02 02:46:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:46:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:46:23] Production.INFO: ==25501== Releasing lock... [2025-03-02 02:46:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:46:23] Production.INFO: 32 MB #Memory Used# [2025-03-02 02:47:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:47:05 [end_date_ymd] => 2025-03-02 02:47:05 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:47:05' and `end` < '2025-03-02 02: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-03-02 02:47:17] Production.INFO: count ==612 [2025-03-02 02:47:17] Production.ERROR: pbx CDR StartTime 2025-03-01 23:47:05 - End Time 2025-03-02 02:47:05 [2025-03-02 02:47:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588165', 'tblTempUsageDetail_20' ) start [2025-03-02 02:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588165', 'tblTempUsageDetail_20' ) end [2025-03-02 02:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588165', 'tblTempVendorCDR_20' ) start [2025-03-02 02:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588165', 'tblTempVendorCDR_20' ) end [2025-03-02 02:47:17] Production.INFO: ProcessCDR(1,14588165,1,1,2) [2025-03-02 02:47:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588165,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:47:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588165,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:47:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588165,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:47:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588165,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:47:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588165', 'tblTempUsageDetail_20' ) start [2025-03-02 02:47:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588165', 'tblTempUsageDetail_20' ) end [2025-03-02 02:47:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:47:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:47:21] Production.INFO: ==25575== Releasing lock... [2025-03-02 02:47:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:47:21] Production.INFO: 32 MB #Memory Used# [2025-03-02 02:48:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:48:06 [end_date_ymd] => 2025-03-02 02:48:06 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:48:06' and `end` < '2025-03-02 02: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-03-02 02:48:17] Production.INFO: count ==612 [2025-03-02 02:48:17] Production.ERROR: pbx CDR StartTime 2025-03-01 23:48:06 - End Time 2025-03-02 02:48:06 [2025-03-02 02:48:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588170', 'tblTempUsageDetail_20' ) start [2025-03-02 02:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588170', 'tblTempUsageDetail_20' ) end [2025-03-02 02:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588170', 'tblTempVendorCDR_20' ) start [2025-03-02 02:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588170', 'tblTempVendorCDR_20' ) end [2025-03-02 02:48:18] Production.INFO: ProcessCDR(1,14588170,1,1,2) [2025-03-02 02:48:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588170,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:48:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588170,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:48:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588170,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:48:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588170,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:48:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588170', 'tblTempUsageDetail_20' ) start [2025-03-02 02:48:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588170', 'tblTempUsageDetail_20' ) end [2025-03-02 02:48:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:48:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:48:21] Production.INFO: ==25647== Releasing lock... [2025-03-02 02:48:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:48:21] Production.INFO: 32 MB #Memory Used# [2025-03-02 02:49:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:49:05 [end_date_ymd] => 2025-03-02 02:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 23:49:05' and `end` < '2025-03-02 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-03-02 02:49:17] Production.INFO: count ==612 [2025-03-02 02:49:17] Production.ERROR: pbx CDR StartTime 2025-03-01 23:49:05 - End Time 2025-03-02 02:49:05 [2025-03-02 02:49:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588175', 'tblTempUsageDetail_20' ) start [2025-03-02 02:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588175', 'tblTempUsageDetail_20' ) end [2025-03-02 02:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588175', 'tblTempVendorCDR_20' ) start [2025-03-02 02:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588175', 'tblTempVendorCDR_20' ) end [2025-03-02 02:49:17] Production.INFO: ProcessCDR(1,14588175,1,1,2) [2025-03-02 02:49:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588175,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:49:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588175,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:49:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588175,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:49:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588175,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:49:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588175', 'tblTempUsageDetail_20' ) start [2025-03-02 02:49:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588175', 'tblTempUsageDetail_20' ) end [2025-03-02 02:49:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:49:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:49:21] Production.INFO: ==25726== Releasing lock... [2025-03-02 02:49:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:49:21] Production.INFO: 32 MB #Memory Used# [2025-03-02 02:50:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:50:07 [end_date_ymd] => 2025-03-02 02:50:07 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:50:07' and `end` < '2025-03-02 02: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-03-02 02:50:19] Production.INFO: count ==622 [2025-03-02 02:50:19] Production.ERROR: pbx CDR StartTime 2025-03-01 23:50:07 - End Time 2025-03-02 02:50:07 [2025-03-02 02:50:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588181', 'tblTempUsageDetail_20' ) start [2025-03-02 02:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588181', 'tblTempUsageDetail_20' ) end [2025-03-02 02:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588181', 'tblTempVendorCDR_20' ) start [2025-03-02 02:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588181', 'tblTempVendorCDR_20' ) end [2025-03-02 02:50:19] Production.INFO: ProcessCDR(1,14588181,1,1,2) [2025-03-02 02:50:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588181,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:50:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588181,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:50:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588181,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:50:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588181,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:50:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588181', 'tblTempUsageDetail_20' ) start [2025-03-02 02:50:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588181', 'tblTempUsageDetail_20' ) end [2025-03-02 02:50:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:50:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:50:22] Production.INFO: ==25802== Releasing lock... [2025-03-02 02:50:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:50:22] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 02:51:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:51:05 [end_date_ymd] => 2025-03-02 02:51:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 23:51:05' and `end` < '2025-03-02 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-03-02 02:51:17] Production.INFO: count ==633 [2025-03-02 02:51:17] Production.ERROR: pbx CDR StartTime 2025-03-01 23:51:05 - End Time 2025-03-02 02:51:05 [2025-03-02 02:51:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588186', 'tblTempUsageDetail_20' ) start [2025-03-02 02:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588186', 'tblTempUsageDetail_20' ) end [2025-03-02 02:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588186', 'tblTempVendorCDR_20' ) start [2025-03-02 02:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588186', 'tblTempVendorCDR_20' ) end [2025-03-02 02:51:17] Production.INFO: ProcessCDR(1,14588186,1,1,2) [2025-03-02 02:51:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588186,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:51:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588186,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:51:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588186,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:51:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588186,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:51:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588186', 'tblTempUsageDetail_20' ) start [2025-03-02 02:51:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588186', 'tblTempUsageDetail_20' ) end [2025-03-02 02:51:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:51:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:51:21] Production.INFO: ==25883== Releasing lock... [2025-03-02 02:51:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:51:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 02:52:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:52:06 [end_date_ymd] => 2025-03-02 02:52:06 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:52:06' and `end` < '2025-03-02 02: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-03-02 02:52:18] Production.INFO: count ==633 [2025-03-02 02:52:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:52:06 - End Time 2025-03-02 02:52:06 [2025-03-02 02:52:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588190', 'tblTempUsageDetail_20' ) start [2025-03-02 02:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588190', 'tblTempUsageDetail_20' ) end [2025-03-02 02:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588190', 'tblTempVendorCDR_20' ) start [2025-03-02 02:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588190', 'tblTempVendorCDR_20' ) end [2025-03-02 02:52:18] Production.INFO: ProcessCDR(1,14588190,1,1,2) [2025-03-02 02:52:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588190,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:52:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588190,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:52:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588190,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:52:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588190,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:52:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588190', 'tblTempUsageDetail_20' ) start [2025-03-02 02:52:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588190', 'tblTempUsageDetail_20' ) end [2025-03-02 02:52:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:52:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:52:21] Production.INFO: ==25958== Releasing lock... [2025-03-02 02:52:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:52:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 02:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:53:05 [end_date_ymd] => 2025-03-02 02:53:05 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:53:05' and `end` < '2025-03-02 02: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-03-02 02:53:17] Production.INFO: count ==633 [2025-03-02 02:53:17] Production.ERROR: pbx CDR StartTime 2025-03-01 23:53:05 - End Time 2025-03-02 02:53:05 [2025-03-02 02:53:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588196', 'tblTempUsageDetail_20' ) start [2025-03-02 02:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588196', 'tblTempUsageDetail_20' ) end [2025-03-02 02:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588196', 'tblTempVendorCDR_20' ) start [2025-03-02 02:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588196', 'tblTempVendorCDR_20' ) end [2025-03-02 02:53:17] Production.INFO: ProcessCDR(1,14588196,1,1,2) [2025-03-02 02:53:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588196,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:53:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588196,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:53:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588196,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:53:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588196,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:53:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588196', 'tblTempUsageDetail_20' ) start [2025-03-02 02:53:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588196', 'tblTempUsageDetail_20' ) end [2025-03-02 02:53:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:53:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:53:20] Production.INFO: ==26038== Releasing lock... [2025-03-02 02:53:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:53:20] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 02:54:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:54:05 [end_date_ymd] => 2025-03-02 02:54:05 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:54:05' and `end` < '2025-03-02 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-03-02 02:54:18] Production.INFO: count ==633 [2025-03-02 02:54:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:54:05 - End Time 2025-03-02 02:54:05 [2025-03-02 02:54:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588201', 'tblTempUsageDetail_20' ) start [2025-03-02 02:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588201', 'tblTempUsageDetail_20' ) end [2025-03-02 02:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588201', 'tblTempVendorCDR_20' ) start [2025-03-02 02:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588201', 'tblTempVendorCDR_20' ) end [2025-03-02 02:54:18] Production.INFO: ProcessCDR(1,14588201,1,1,2) [2025-03-02 02:54:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588201,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:54:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588201,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:54:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588201,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:54:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588201,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:54:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588201', 'tblTempUsageDetail_20' ) start [2025-03-02 02:54:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588201', 'tblTempUsageDetail_20' ) end [2025-03-02 02:54:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:54:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:54:21] Production.INFO: ==26116== Releasing lock... [2025-03-02 02:54:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:54:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 02:55:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:55:06 [end_date_ymd] => 2025-03-02 02:55:06 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:55:06' and `end` < '2025-03-02 02: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-03-02 02:55:18] Production.INFO: count ==633 [2025-03-02 02:55:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:55:06 - End Time 2025-03-02 02:55:06 [2025-03-02 02:55:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588206', 'tblTempUsageDetail_20' ) start [2025-03-02 02:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588206', 'tblTempUsageDetail_20' ) end [2025-03-02 02:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588206', 'tblTempVendorCDR_20' ) start [2025-03-02 02:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588206', 'tblTempVendorCDR_20' ) end [2025-03-02 02:55:18] Production.INFO: ProcessCDR(1,14588206,1,1,2) [2025-03-02 02:55:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588206,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:55:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588206,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:55:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588206,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:55:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588206,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588206', 'tblTempUsageDetail_20' ) start [2025-03-02 02:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588206', 'tblTempUsageDetail_20' ) end [2025-03-02 02:55:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:55:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:55:21] Production.INFO: ==26190== Releasing lock... [2025-03-02 02:55:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:55:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 02:56:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:56:05 [end_date_ymd] => 2025-03-02 02:56:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 23:56:05' and `end` < '2025-03-02 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-03-02 02:56:17] Production.INFO: count ==630 [2025-03-02 02:56:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:56:05 - End Time 2025-03-02 02:56:05 [2025-03-02 02:56:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588211', 'tblTempUsageDetail_20' ) start [2025-03-02 02:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588211', 'tblTempUsageDetail_20' ) end [2025-03-02 02:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588211', 'tblTempVendorCDR_20' ) start [2025-03-02 02:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588211', 'tblTempVendorCDR_20' ) end [2025-03-02 02:56:18] Production.INFO: ProcessCDR(1,14588211,1,1,2) [2025-03-02 02:56:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588211,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:56:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588211,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:56:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588211,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:56:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588211,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:56:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588211', 'tblTempUsageDetail_20' ) start [2025-03-02 02:56:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588211', 'tblTempUsageDetail_20' ) end [2025-03-02 02:56:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:56:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:56:21] Production.INFO: ==26268== Releasing lock... [2025-03-02 02:56:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:56:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 02:57:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:57:05 [end_date_ymd] => 2025-03-02 02:57:05 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:57:05' and `end` < '2025-03-02 02: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-03-02 02:57:17] Production.INFO: count ==630 [2025-03-02 02:57:17] Production.ERROR: pbx CDR StartTime 2025-03-01 23:57:05 - End Time 2025-03-02 02:57:05 [2025-03-02 02:57:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588216', 'tblTempUsageDetail_20' ) start [2025-03-02 02:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588216', 'tblTempUsageDetail_20' ) end [2025-03-02 02:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588216', 'tblTempVendorCDR_20' ) start [2025-03-02 02:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588216', 'tblTempVendorCDR_20' ) end [2025-03-02 02:57:17] Production.INFO: ProcessCDR(1,14588216,1,1,2) [2025-03-02 02:57:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588216,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:57:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588216,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:57:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588216,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:57:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588216,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:57:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588216', 'tblTempUsageDetail_20' ) start [2025-03-02 02:57:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588216', 'tblTempUsageDetail_20' ) end [2025-03-02 02:57:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:57:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:57:20] Production.INFO: ==26346== Releasing lock... [2025-03-02 02:57:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:57:20] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 02:58:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:58:05 [end_date_ymd] => 2025-03-02 02:58:05 [RateCDR] => 1 ) [2025-03-02 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-03-01 23:58:05' and `end` < '2025-03-02 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-03-02 02:58:17] Production.INFO: count ==630 [2025-03-02 02:58:17] Production.ERROR: pbx CDR StartTime 2025-03-01 23:58:05 - End Time 2025-03-02 02:58:05 [2025-03-02 02:58:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588221', 'tblTempUsageDetail_20' ) start [2025-03-02 02:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588221', 'tblTempUsageDetail_20' ) end [2025-03-02 02:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588221', 'tblTempVendorCDR_20' ) start [2025-03-02 02:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588221', 'tblTempVendorCDR_20' ) end [2025-03-02 02:58:18] Production.INFO: ProcessCDR(1,14588221,1,1,2) [2025-03-02 02:58:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588221,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:58:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588221,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:58:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588221,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:58:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588221,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:58:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588221', 'tblTempUsageDetail_20' ) start [2025-03-02 02:58:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588221', 'tblTempUsageDetail_20' ) end [2025-03-02 02:58:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:58:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:58:21] Production.INFO: ==26466== Releasing lock... [2025-03-02 02:58:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:58:21] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 02:59:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-01 23:59:06 [end_date_ymd] => 2025-03-02 02:59:06 [RateCDR] => 1 ) [2025-03-02 02: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-03-01 23:59:06' and `end` < '2025-03-02 02: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-03-02 02:59:18] Production.INFO: count ==628 [2025-03-02 02:59:18] Production.ERROR: pbx CDR StartTime 2025-03-01 23:59:06 - End Time 2025-03-02 02:59:06 [2025-03-02 02:59:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 02:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588226', 'tblTempUsageDetail_20' ) start [2025-03-02 02:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588226', 'tblTempUsageDetail_20' ) end [2025-03-02 02:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588226', 'tblTempVendorCDR_20' ) start [2025-03-02 02:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588226', 'tblTempVendorCDR_20' ) end [2025-03-02 02:59:18] Production.INFO: ProcessCDR(1,14588226,1,1,2) [2025-03-02 02:59:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588226,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:59:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588226,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 02:59:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588226,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:59:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588226,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 02:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588226', 'tblTempUsageDetail_20' ) start [2025-03-02 02:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588226', 'tblTempUsageDetail_20' ) end [2025-03-02 02:59:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 02:59:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 02:59:21] Production.INFO: ==26535== Releasing lock... [2025-03-02 02:59:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 02:59:21] Production.INFO: 32 MB #Memory Used# [2025-03-02 03:00:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:00:06 [end_date_ymd] => 2025-03-02 03:00:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:00:06' and `end` < '2025-03-02 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-03-02 03:00:18] Production.INFO: count ==632 [2025-03-02 03:00:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:00:06 - End Time 2025-03-02 03:00:06 [2025-03-02 03:00:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588232', 'tblTempUsageDetail_20' ) start [2025-03-02 03:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588232', 'tblTempUsageDetail_20' ) end [2025-03-02 03:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588232', 'tblTempVendorCDR_20' ) start [2025-03-02 03:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588232', 'tblTempVendorCDR_20' ) end [2025-03-02 03:00:18] Production.INFO: ProcessCDR(1,14588232,1,1,2) [2025-03-02 03:00:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588232,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:00:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588232,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:00:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588232,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:00:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588232,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:00:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588232', 'tblTempUsageDetail_20' ) start [2025-03-02 03:00:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588232', 'tblTempUsageDetail_20' ) end [2025-03-02 03:00:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:00:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:00:23] Production.INFO: ==26622== Releasing lock... [2025-03-02 03:00:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:00:23] Production.INFO: 32 MB #Memory Used# [2025-03-02 03:01:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:01:05 [end_date_ymd] => 2025-03-02 03:01:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:01:05' and `end` < '2025-03-02 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-03-02 03:01:17] Production.INFO: count ==631 [2025-03-02 03:01:17] Production.ERROR: pbx CDR StartTime 2025-03-02 00:01:05 - End Time 2025-03-02 03:01:05 [2025-03-02 03:01:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588237', 'tblTempUsageDetail_20' ) start [2025-03-02 03:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588237', 'tblTempUsageDetail_20' ) end [2025-03-02 03:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588237', 'tblTempVendorCDR_20' ) start [2025-03-02 03:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588237', 'tblTempVendorCDR_20' ) end [2025-03-02 03:01:17] Production.INFO: ProcessCDR(1,14588237,1,1,2) [2025-03-02 03:01:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588237,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:01:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588237,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:01:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588237,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:01:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588237,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588237', 'tblTempUsageDetail_20' ) start [2025-03-02 03:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588237', 'tblTempUsageDetail_20' ) end [2025-03-02 03:01:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:01:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:01:21] Production.INFO: ==26730== Releasing lock... [2025-03-02 03:01:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:01:21] Production.INFO: 32 MB #Memory Used# [2025-03-02 03:02:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:02:05 [end_date_ymd] => 2025-03-02 03:02:05 [RateCDR] => 1 ) [2025-03-02 03: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-03-02 00:02:05' and `end` < '2025-03-02 03: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-03-02 03:02:17] Production.INFO: count ==628 [2025-03-02 03:02:17] Production.ERROR: pbx CDR StartTime 2025-03-02 00:02:05 - End Time 2025-03-02 03:02:05 [2025-03-02 03:02:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588242', 'tblTempUsageDetail_20' ) start [2025-03-02 03:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588242', 'tblTempUsageDetail_20' ) end [2025-03-02 03:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588242', 'tblTempVendorCDR_20' ) start [2025-03-02 03:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588242', 'tblTempVendorCDR_20' ) end [2025-03-02 03:02:17] Production.INFO: ProcessCDR(1,14588242,1,1,2) [2025-03-02 03:02:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588242,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:02:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588242,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:02:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588242,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:02:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588242,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:02:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588242', 'tblTempUsageDetail_20' ) start [2025-03-02 03:02:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588242', 'tblTempUsageDetail_20' ) end [2025-03-02 03:02:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:02:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:02:21] Production.INFO: ==26896== Releasing lock... [2025-03-02 03:02:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:02:21] Production.INFO: 32 MB #Memory Used# [2025-03-02 03:03:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:03:05 [end_date_ymd] => 2025-03-02 03:03:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:03:05' and `end` < '2025-03-02 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-03-02 03:03:17] Production.INFO: count ==624 [2025-03-02 03:03:17] Production.ERROR: pbx CDR StartTime 2025-03-02 00:03:05 - End Time 2025-03-02 03:03:05 [2025-03-02 03:03:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588247', 'tblTempUsageDetail_20' ) start [2025-03-02 03:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588247', 'tblTempUsageDetail_20' ) end [2025-03-02 03:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588247', 'tblTempVendorCDR_20' ) start [2025-03-02 03:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588247', 'tblTempVendorCDR_20' ) end [2025-03-02 03:03:17] Production.INFO: ProcessCDR(1,14588247,1,1,2) [2025-03-02 03:03:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588247,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:03:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588247,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:03:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588247,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:03:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588247,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:03:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588247', 'tblTempUsageDetail_20' ) start [2025-03-02 03:03:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588247', 'tblTempUsageDetail_20' ) end [2025-03-02 03:03:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:03:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:03:20] Production.INFO: ==26982== Releasing lock... [2025-03-02 03:03:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:03:20] Production.INFO: 32 MB #Memory Used# [2025-03-02 03:04:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:04:05 [end_date_ymd] => 2025-03-02 03:04:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:04:05' and `end` < '2025-03-02 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-03-02 03:04:17] Production.INFO: count ==623 [2025-03-02 03:04:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:04:05 - End Time 2025-03-02 03:04:05 [2025-03-02 03:04:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:04:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588252', 'tblTempUsageDetail_20' ) start [2025-03-02 03:04:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588252', 'tblTempUsageDetail_20' ) end [2025-03-02 03:04:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588252', 'tblTempVendorCDR_20' ) start [2025-03-02 03:04:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588252', 'tblTempVendorCDR_20' ) end [2025-03-02 03:04:18] Production.INFO: ProcessCDR(1,14588252,1,1,2) [2025-03-02 03:04:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588252,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:04:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588252,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:04:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588252,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:04:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588252,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:04:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588252', 'tblTempUsageDetail_20' ) start [2025-03-02 03:04:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588252', 'tblTempUsageDetail_20' ) end [2025-03-02 03:04:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:04:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:04:21] Production.INFO: ==27058== Releasing lock... [2025-03-02 03:04:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:04:21] Production.INFO: 32 MB #Memory Used# [2025-03-02 03:05:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:05:05 [end_date_ymd] => 2025-03-02 03:05:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:05:05' and `end` < '2025-03-02 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-03-02 03:05:17] Production.INFO: count ==623 [2025-03-02 03:05:17] Production.ERROR: pbx CDR StartTime 2025-03-02 00:05:05 - End Time 2025-03-02 03:05:05 [2025-03-02 03:05:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588257', 'tblTempUsageDetail_20' ) start [2025-03-02 03:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588257', 'tblTempUsageDetail_20' ) end [2025-03-02 03:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588257', 'tblTempVendorCDR_20' ) start [2025-03-02 03:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588257', 'tblTempVendorCDR_20' ) end [2025-03-02 03:05:17] Production.INFO: ProcessCDR(1,14588257,1,1,2) [2025-03-02 03:05:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588257,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:05:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588257,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:05:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588257,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:05:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588257,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:05:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588257', 'tblTempUsageDetail_20' ) start [2025-03-02 03:05:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588257', 'tblTempUsageDetail_20' ) end [2025-03-02 03:05:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:05:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:05:20] Production.INFO: ==27134== Releasing lock... [2025-03-02 03:05:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:05:20] Production.INFO: 32 MB #Memory Used# [2025-03-02 03:06:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:06:05 [end_date_ymd] => 2025-03-02 03:06:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:06:05' and `end` < '2025-03-02 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-03-02 03:06:17] Production.INFO: count ==616 [2025-03-02 03:06:17] Production.ERROR: pbx CDR StartTime 2025-03-02 00:06:05 - End Time 2025-03-02 03:06:05 [2025-03-02 03:06:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588262', 'tblTempUsageDetail_20' ) start [2025-03-02 03:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588262', 'tblTempUsageDetail_20' ) end [2025-03-02 03:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588262', 'tblTempVendorCDR_20' ) start [2025-03-02 03:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588262', 'tblTempVendorCDR_20' ) end [2025-03-02 03:06:17] Production.INFO: ProcessCDR(1,14588262,1,1,2) [2025-03-02 03:06:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588262,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:06:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588262,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:06:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588262,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:06:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588262,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:06:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588262', 'tblTempUsageDetail_20' ) start [2025-03-02 03:06:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588262', 'tblTempUsageDetail_20' ) end [2025-03-02 03:06:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:06:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:06:21] Production.INFO: ==27294== Releasing lock... [2025-03-02 03:06:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:06:21] Production.INFO: 32 MB #Memory Used# [2025-03-02 03:07:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:07:05 [end_date_ymd] => 2025-03-02 03:07:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:07:05' and `end` < '2025-03-02 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-03-02 03:07:17] Production.INFO: count ==612 [2025-03-02 03:07:17] Production.ERROR: pbx CDR StartTime 2025-03-02 00:07:05 - End Time 2025-03-02 03:07:05 [2025-03-02 03:07:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588267', 'tblTempUsageDetail_20' ) start [2025-03-02 03:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588267', 'tblTempUsageDetail_20' ) end [2025-03-02 03:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588267', 'tblTempVendorCDR_20' ) start [2025-03-02 03:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588267', 'tblTempVendorCDR_20' ) end [2025-03-02 03:07:17] Production.INFO: ProcessCDR(1,14588267,1,1,2) [2025-03-02 03:07:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588267,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:07:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588267,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:07:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588267,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:07:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588267,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:07:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588267', 'tblTempUsageDetail_20' ) start [2025-03-02 03:07:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588267', 'tblTempUsageDetail_20' ) end [2025-03-02 03:07:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:07:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:07:20] Production.INFO: ==27401== Releasing lock... [2025-03-02 03:07:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:07:20] Production.INFO: 32 MB #Memory Used# [2025-03-02 03:08:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:08:05 [end_date_ymd] => 2025-03-02 03:08:05 [RateCDR] => 1 ) [2025-03-02 03: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-03-02 00:08:05' and `end` < '2025-03-02 03: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-03-02 03:08:17] Production.INFO: count ==610 [2025-03-02 03:08:17] Production.ERROR: pbx CDR StartTime 2025-03-02 00:08:05 - End Time 2025-03-02 03:08:05 [2025-03-02 03:08:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588272', 'tblTempUsageDetail_20' ) start [2025-03-02 03:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588272', 'tblTempUsageDetail_20' ) end [2025-03-02 03:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588272', 'tblTempVendorCDR_20' ) start [2025-03-02 03:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588272', 'tblTempVendorCDR_20' ) end [2025-03-02 03:08:17] Production.INFO: ProcessCDR(1,14588272,1,1,2) [2025-03-02 03:08:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588272,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:08:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588272,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:08:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588272,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:08:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588272,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:08:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588272', 'tblTempUsageDetail_20' ) start [2025-03-02 03:08:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588272', 'tblTempUsageDetail_20' ) end [2025-03-02 03:08:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:08:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:08:22] Production.INFO: ==27482== Releasing lock... [2025-03-02 03:08:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:08:22] Production.INFO: 32 MB #Memory Used# [2025-03-02 03:09:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:09:06 [end_date_ymd] => 2025-03-02 03:09:06 [RateCDR] => 1 ) [2025-03-02 03: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-03-02 00:09:06' and `end` < '2025-03-02 03: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-03-02 03:09:18] Production.INFO: count ==606 [2025-03-02 03:09:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:09:06 - End Time 2025-03-02 03:09:06 [2025-03-02 03:09:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588277', 'tblTempUsageDetail_20' ) start [2025-03-02 03:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588277', 'tblTempUsageDetail_20' ) end [2025-03-02 03:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588277', 'tblTempVendorCDR_20' ) start [2025-03-02 03:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588277', 'tblTempVendorCDR_20' ) end [2025-03-02 03:09:18] Production.INFO: ProcessCDR(1,14588277,1,1,2) [2025-03-02 03:09:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588277,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:09:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588277,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:09:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588277,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:09:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588277,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:09:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588277', 'tblTempUsageDetail_20' ) start [2025-03-02 03:09:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588277', 'tblTempUsageDetail_20' ) end [2025-03-02 03:09:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:09:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:09:22] Production.INFO: ==27635== Releasing lock... [2025-03-02 03:09:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:09:22] Production.INFO: 32 MB #Memory Used# [2025-03-02 03:10:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:10:06 [end_date_ymd] => 2025-03-02 03:10:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:10:06' and `end` < '2025-03-02 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-03-02 03:10:18] Production.INFO: count ==606 [2025-03-02 03:10:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:10:06 - End Time 2025-03-02 03:10:06 [2025-03-02 03:10:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588283', 'tblTempUsageDetail_20' ) start [2025-03-02 03:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588283', 'tblTempUsageDetail_20' ) end [2025-03-02 03:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588283', 'tblTempVendorCDR_20' ) start [2025-03-02 03:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588283', 'tblTempVendorCDR_20' ) end [2025-03-02 03:10:18] Production.INFO: ProcessCDR(1,14588283,1,1,2) [2025-03-02 03:10:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588283,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:10:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588283,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:10:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588283,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:10:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588283,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:10:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588283', 'tblTempUsageDetail_20' ) start [2025-03-02 03:10:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588283', 'tblTempUsageDetail_20' ) end [2025-03-02 03:10:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:10:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:10:21] Production.INFO: ==27714== Releasing lock... [2025-03-02 03:10:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:10:21] Production.INFO: 32 MB #Memory Used# [2025-03-02 03:11:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:11:06 [end_date_ymd] => 2025-03-02 03:11:06 [RateCDR] => 1 ) [2025-03-02 03: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-03-02 00:11:06' and `end` < '2025-03-02 03: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-03-02 03:11:18] Production.INFO: count ==575 [2025-03-02 03:11:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:11:06 - End Time 2025-03-02 03:11:06 [2025-03-02 03:11:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:11:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588288', 'tblTempUsageDetail_20' ) start [2025-03-02 03:11:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588288', 'tblTempUsageDetail_20' ) end [2025-03-02 03:11:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588288', 'tblTempVendorCDR_20' ) start [2025-03-02 03:11:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588288', 'tblTempVendorCDR_20' ) end [2025-03-02 03:11:18] Production.INFO: ProcessCDR(1,14588288,1,1,2) [2025-03-02 03:11:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588288,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:11:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588288,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:11:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588288,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:11:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588288,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:11:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588288', 'tblTempUsageDetail_20' ) start [2025-03-02 03:11:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588288', 'tblTempUsageDetail_20' ) end [2025-03-02 03:11:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:11:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:11:21] Production.INFO: ==27799== Releasing lock... [2025-03-02 03:11:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:11:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 03:12:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:12:05 [end_date_ymd] => 2025-03-02 03:12:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:12:05' and `end` < '2025-03-02 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-03-02 03:12:17] Production.INFO: count ==573 [2025-03-02 03:12:17] Production.ERROR: pbx CDR StartTime 2025-03-02 00:12:05 - End Time 2025-03-02 03:12:05 [2025-03-02 03:12:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588293', 'tblTempUsageDetail_20' ) start [2025-03-02 03:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588293', 'tblTempUsageDetail_20' ) end [2025-03-02 03:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588293', 'tblTempVendorCDR_20' ) start [2025-03-02 03:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588293', 'tblTempVendorCDR_20' ) end [2025-03-02 03:12:17] Production.INFO: ProcessCDR(1,14588293,1,1,2) [2025-03-02 03:12:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588293,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:12:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588293,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:12:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588293,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:12:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588293,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:12:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588293', 'tblTempUsageDetail_20' ) start [2025-03-02 03:12:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588293', 'tblTempUsageDetail_20' ) end [2025-03-02 03:12:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:12:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:12:21] Production.INFO: ==27875== Releasing lock... [2025-03-02 03:12:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:12:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 03:13:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:13:06 [end_date_ymd] => 2025-03-02 03:13:06 [RateCDR] => 1 ) [2025-03-02 03: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-03-02 00:13:06' and `end` < '2025-03-02 03: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-03-02 03:13:18] Production.INFO: count ==573 [2025-03-02 03:13:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:13:06 - End Time 2025-03-02 03:13:06 [2025-03-02 03:13:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588298', 'tblTempUsageDetail_20' ) start [2025-03-02 03:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588298', 'tblTempUsageDetail_20' ) end [2025-03-02 03:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588298', 'tblTempVendorCDR_20' ) start [2025-03-02 03:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588298', 'tblTempVendorCDR_20' ) end [2025-03-02 03:13:18] Production.INFO: ProcessCDR(1,14588298,1,1,2) [2025-03-02 03:13:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588298,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:13:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588298,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:13:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588298,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:13:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588298,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:13:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588298', 'tblTempUsageDetail_20' ) start [2025-03-02 03:13:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588298', 'tblTempUsageDetail_20' ) end [2025-03-02 03:13:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:13:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:13:21] Production.INFO: ==28066== Releasing lock... [2025-03-02 03:13:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:13:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 03:14:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:14:05 [end_date_ymd] => 2025-03-02 03:14:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:14:05' and `end` < '2025-03-02 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-03-02 03:14:17] Production.INFO: count ==573 [2025-03-02 03:14:17] Production.ERROR: pbx CDR StartTime 2025-03-02 00:14:05 - End Time 2025-03-02 03:14:05 [2025-03-02 03:14:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588303', 'tblTempUsageDetail_20' ) start [2025-03-02 03:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588303', 'tblTempUsageDetail_20' ) end [2025-03-02 03:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588303', 'tblTempVendorCDR_20' ) start [2025-03-02 03:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588303', 'tblTempVendorCDR_20' ) end [2025-03-02 03:14:17] Production.INFO: ProcessCDR(1,14588303,1,1,2) [2025-03-02 03:14:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588303,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:14:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588303,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:14:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588303,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:14:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588303,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:14:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588303', 'tblTempUsageDetail_20' ) start [2025-03-02 03:14:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588303', 'tblTempUsageDetail_20' ) end [2025-03-02 03:14:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:14:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:14:20] Production.INFO: ==28139== Releasing lock... [2025-03-02 03:14:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:14:20] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 03:15:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:15:06 [end_date_ymd] => 2025-03-02 03:15:06 [RateCDR] => 1 ) [2025-03-02 03: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-03-02 00:15:06' and `end` < '2025-03-02 03: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-03-02 03:15:18] Production.INFO: count ==567 [2025-03-02 03:15:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:15:06 - End Time 2025-03-02 03:15:06 [2025-03-02 03:15:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588308', 'tblTempUsageDetail_20' ) start [2025-03-02 03:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588308', 'tblTempUsageDetail_20' ) end [2025-03-02 03:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588308', 'tblTempVendorCDR_20' ) start [2025-03-02 03:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588308', 'tblTempVendorCDR_20' ) end [2025-03-02 03:15:18] Production.INFO: ProcessCDR(1,14588308,1,1,2) [2025-03-02 03:15:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588308,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:15:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588308,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:15:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588308,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:15:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588308,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:15:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588308', 'tblTempUsageDetail_20' ) start [2025-03-02 03:15:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588308', 'tblTempUsageDetail_20' ) end [2025-03-02 03:15:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:15:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:15:21] Production.INFO: ==28219== Releasing lock... [2025-03-02 03:15:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:15:21] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 03:16:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:16:05 [end_date_ymd] => 2025-03-02 03:16:05 [RateCDR] => 1 ) [2025-03-02 03: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-03-02 00:16:05' and `end` < '2025-03-02 03: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-03-02 03:16:17] Production.INFO: count ==567 [2025-03-02 03:16:17] Production.ERROR: pbx CDR StartTime 2025-03-02 00:16:05 - End Time 2025-03-02 03:16:05 [2025-03-02 03:16:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588313', 'tblTempUsageDetail_20' ) start [2025-03-02 03:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588313', 'tblTempUsageDetail_20' ) end [2025-03-02 03:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588313', 'tblTempVendorCDR_20' ) start [2025-03-02 03:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588313', 'tblTempVendorCDR_20' ) end [2025-03-02 03:16:17] Production.INFO: ProcessCDR(1,14588313,1,1,2) [2025-03-02 03:16:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588313,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:16:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588313,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:16:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588313,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:16:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588313,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:16:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588313', 'tblTempUsageDetail_20' ) start [2025-03-02 03:16:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588313', 'tblTempUsageDetail_20' ) end [2025-03-02 03:16:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:16:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:16:20] Production.INFO: ==28295== Releasing lock... [2025-03-02 03:16:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:16:20] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 03:17:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:17:05 [end_date_ymd] => 2025-03-02 03:17:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:17:05' and `end` < '2025-03-02 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-03-02 03:17:17] Production.INFO: count ==562 [2025-03-02 03:17:17] Production.ERROR: pbx CDR StartTime 2025-03-02 00:17:05 - End Time 2025-03-02 03:17:05 [2025-03-02 03:17:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588318', 'tblTempUsageDetail_20' ) start [2025-03-02 03:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588318', 'tblTempUsageDetail_20' ) end [2025-03-02 03:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588318', 'tblTempVendorCDR_20' ) start [2025-03-02 03:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588318', 'tblTempVendorCDR_20' ) end [2025-03-02 03:17:18] Production.INFO: ProcessCDR(1,14588318,1,1,2) [2025-03-02 03:17:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588318,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:17:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588318,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:17:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588318,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:17:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588318,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588318', 'tblTempUsageDetail_20' ) start [2025-03-02 03:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588318', 'tblTempUsageDetail_20' ) end [2025-03-02 03:17:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:17:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:17:21] Production.INFO: ==28482== Releasing lock... [2025-03-02 03:17:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:17:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 03:18:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:18:05 [end_date_ymd] => 2025-03-02 03:18:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:18:05' and `end` < '2025-03-02 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-03-02 03:18:17] Production.INFO: count ==561 [2025-03-02 03:18:17] Production.ERROR: pbx CDR StartTime 2025-03-02 00:18:05 - End Time 2025-03-02 03:18:05 [2025-03-02 03:18:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588323', 'tblTempUsageDetail_20' ) start [2025-03-02 03:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588323', 'tblTempUsageDetail_20' ) end [2025-03-02 03:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588323', 'tblTempVendorCDR_20' ) start [2025-03-02 03:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588323', 'tblTempVendorCDR_20' ) end [2025-03-02 03:18:17] Production.INFO: ProcessCDR(1,14588323,1,1,2) [2025-03-02 03:18:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588323,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:18:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588323,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:18:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588323,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:18:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588323,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:18:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588323', 'tblTempUsageDetail_20' ) start [2025-03-02 03:18:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588323', 'tblTempUsageDetail_20' ) end [2025-03-02 03:18:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:18:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:18:20] Production.INFO: ==28582== Releasing lock... [2025-03-02 03:18:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:18:20] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 03:19:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:19:05 [end_date_ymd] => 2025-03-02 03:19:05 [RateCDR] => 1 ) [2025-03-02 03: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-03-02 00:19:05' and `end` < '2025-03-02 03: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-03-02 03:19:17] Production.INFO: count ==561 [2025-03-02 03:19:17] Production.ERROR: pbx CDR StartTime 2025-03-02 00:19:05 - End Time 2025-03-02 03:19:05 [2025-03-02 03:19:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588328', 'tblTempUsageDetail_20' ) start [2025-03-02 03:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588328', 'tblTempUsageDetail_20' ) end [2025-03-02 03:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588328', 'tblTempVendorCDR_20' ) start [2025-03-02 03:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588328', 'tblTempVendorCDR_20' ) end [2025-03-02 03:19:17] Production.INFO: ProcessCDR(1,14588328,1,1,2) [2025-03-02 03:19:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588328,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:19:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588328,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:19:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588328,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:19:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588328,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:19:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588328', 'tblTempUsageDetail_20' ) start [2025-03-02 03:19:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588328', 'tblTempUsageDetail_20' ) end [2025-03-02 03:19:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:19:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:19:21] Production.INFO: ==28663== Releasing lock... [2025-03-02 03:19:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:19:21] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 03:20:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:20:06 [end_date_ymd] => 2025-03-02 03:20:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:20:06' and `end` < '2025-03-02 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-03-02 03:20:18] Production.INFO: count ==555 [2025-03-02 03:20:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:20:06 - End Time 2025-03-02 03:20:06 [2025-03-02 03:20:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588333', 'tblTempUsageDetail_20' ) start [2025-03-02 03:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588333', 'tblTempUsageDetail_20' ) end [2025-03-02 03:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588333', 'tblTempVendorCDR_20' ) start [2025-03-02 03:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588333', 'tblTempVendorCDR_20' ) end [2025-03-02 03:20:18] Production.INFO: ProcessCDR(1,14588333,1,1,2) [2025-03-02 03:20:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588333,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:20:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588333,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:20:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588333,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:20:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588333,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:20:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588333', 'tblTempUsageDetail_20' ) start [2025-03-02 03:20:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588333', 'tblTempUsageDetail_20' ) end [2025-03-02 03:20:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:20:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:20:21] Production.INFO: ==28742== Releasing lock... [2025-03-02 03:20:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:20:21] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 03:21:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:21:05 [end_date_ymd] => 2025-03-02 03:21:05 [RateCDR] => 1 ) [2025-03-02 03: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-03-02 00:21:05' and `end` < '2025-03-02 03: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-03-02 03:21:17] Production.INFO: count ==529 [2025-03-02 03:21:17] Production.ERROR: pbx CDR StartTime 2025-03-02 00:21:05 - End Time 2025-03-02 03:21:05 [2025-03-02 03:21:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588339', 'tblTempUsageDetail_20' ) start [2025-03-02 03:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588339', 'tblTempUsageDetail_20' ) end [2025-03-02 03:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588339', 'tblTempVendorCDR_20' ) start [2025-03-02 03:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588339', 'tblTempVendorCDR_20' ) end [2025-03-02 03:21:17] Production.INFO: ProcessCDR(1,14588339,1,1,2) [2025-03-02 03:21:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588339,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:21:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588339,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:21:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588339,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:21:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588339,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:21:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588339', 'tblTempUsageDetail_20' ) start [2025-03-02 03:21:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588339', 'tblTempUsageDetail_20' ) end [2025-03-02 03:21:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:21:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:21:20] Production.INFO: ==28816== Releasing lock... [2025-03-02 03:21:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:21:20] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 03:22:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:22:05 [end_date_ymd] => 2025-03-02 03:22:05 [RateCDR] => 1 ) [2025-03-02 03: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-03-02 00:22:05' and `end` < '2025-03-02 03: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-03-02 03:22:17] Production.INFO: count ==529 [2025-03-02 03:22:17] Production.ERROR: pbx CDR StartTime 2025-03-02 00:22:05 - End Time 2025-03-02 03:22:05 [2025-03-02 03:22:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588344', 'tblTempUsageDetail_20' ) start [2025-03-02 03:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588344', 'tblTempUsageDetail_20' ) end [2025-03-02 03:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588344', 'tblTempVendorCDR_20' ) start [2025-03-02 03:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588344', 'tblTempVendorCDR_20' ) end [2025-03-02 03:22:17] Production.INFO: ProcessCDR(1,14588344,1,1,2) [2025-03-02 03:22:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588344,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:22:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588344,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:22:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588344,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:22:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588344,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588344', 'tblTempUsageDetail_20' ) start [2025-03-02 03:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588344', 'tblTempUsageDetail_20' ) end [2025-03-02 03:22:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:22:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:22:21] Production.INFO: ==28896== Releasing lock... [2025-03-02 03:22:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:22:21] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 03:23:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:23:04 [end_date_ymd] => 2025-03-02 03:23:04 [RateCDR] => 1 ) [2025-03-02 03:23: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-03-02 00:23:04' and `end` < '2025-03-02 03:23: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-03-02 03:23:16] Production.INFO: count ==527 [2025-03-02 03:23:16] Production.ERROR: pbx CDR StartTime 2025-03-02 00:23:04 - End Time 2025-03-02 03:23:04 [2025-03-02 03:23:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588349', 'tblTempUsageDetail_20' ) start [2025-03-02 03:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588349', 'tblTempUsageDetail_20' ) end [2025-03-02 03:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588349', 'tblTempVendorCDR_20' ) start [2025-03-02 03:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588349', 'tblTempVendorCDR_20' ) end [2025-03-02 03:23:16] Production.INFO: ProcessCDR(1,14588349,1,1,2) [2025-03-02 03:23:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588349,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:23:17] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588349,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:23:17] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588349,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:23:19] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588349,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:23:19] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588349', 'tblTempUsageDetail_20' ) start [2025-03-02 03:23:19] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588349', 'tblTempUsageDetail_20' ) end [2025-03-02 03:23:19] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:23:19] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:23:19] Production.INFO: ==28984== Releasing lock... [2025-03-02 03:23:19] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:23:19] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 03:24:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:24:05 [end_date_ymd] => 2025-03-02 03:24:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:24:05' and `end` < '2025-03-02 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-03-02 03:24:17] Production.INFO: count ==523 [2025-03-02 03:24:17] Production.ERROR: pbx CDR StartTime 2025-03-02 00:24:05 - End Time 2025-03-02 03:24:05 [2025-03-02 03:24:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588354', 'tblTempUsageDetail_20' ) start [2025-03-02 03:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588354', 'tblTempUsageDetail_20' ) end [2025-03-02 03:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588354', 'tblTempVendorCDR_20' ) start [2025-03-02 03:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588354', 'tblTempVendorCDR_20' ) end [2025-03-02 03:24:17] Production.INFO: ProcessCDR(1,14588354,1,1,2) [2025-03-02 03:24:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588354,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:24:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588354,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:24:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588354,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:24:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588354,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:24:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588354', 'tblTempUsageDetail_20' ) start [2025-03-02 03:24:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588354', 'tblTempUsageDetail_20' ) end [2025-03-02 03:24:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:24:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:24:20] Production.INFO: ==29069== Releasing lock... [2025-03-02 03:24:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:24:20] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 03:25:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:25:05 [end_date_ymd] => 2025-03-02 03:25:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:25:05' and `end` < '2025-03-02 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-03-02 03:25:17] Production.INFO: count ==522 [2025-03-02 03:25:17] Production.ERROR: pbx CDR StartTime 2025-03-02 00:25:05 - End Time 2025-03-02 03:25:05 [2025-03-02 03:25:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588359', 'tblTempUsageDetail_20' ) start [2025-03-02 03:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588359', 'tblTempUsageDetail_20' ) end [2025-03-02 03:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588359', 'tblTempVendorCDR_20' ) start [2025-03-02 03:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588359', 'tblTempVendorCDR_20' ) end [2025-03-02 03:25:17] Production.INFO: ProcessCDR(1,14588359,1,1,2) [2025-03-02 03:25:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588359,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:25:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588359,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:25:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588359,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:25:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588359,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:25:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588359', 'tblTempUsageDetail_20' ) start [2025-03-02 03:25:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588359', 'tblTempUsageDetail_20' ) end [2025-03-02 03:25:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:25:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:25:20] Production.INFO: ==29151== Releasing lock... [2025-03-02 03:25:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:25:20] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 03:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:26:05 [end_date_ymd] => 2025-03-02 03:26:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:26:05' and `end` < '2025-03-02 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-03-02 03:26:17] Production.INFO: count ==522 [2025-03-02 03:26:17] Production.ERROR: pbx CDR StartTime 2025-03-02 00:26:05 - End Time 2025-03-02 03:26:05 [2025-03-02 03:26:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588364', 'tblTempUsageDetail_20' ) start [2025-03-02 03:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588364', 'tblTempUsageDetail_20' ) end [2025-03-02 03:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588364', 'tblTempVendorCDR_20' ) start [2025-03-02 03:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588364', 'tblTempVendorCDR_20' ) end [2025-03-02 03:26:17] Production.INFO: ProcessCDR(1,14588364,1,1,2) [2025-03-02 03:26:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588364,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:26:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588364,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:26:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588364,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:26:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588364,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:26:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588364', 'tblTempUsageDetail_20' ) start [2025-03-02 03:26:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588364', 'tblTempUsageDetail_20' ) end [2025-03-02 03:26:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:26:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:26:21] Production.INFO: ==29227== Releasing lock... [2025-03-02 03:26:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:26:21] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 03:27:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:27:05 [end_date_ymd] => 2025-03-02 03:27:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:27:05' and `end` < '2025-03-02 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-03-02 03:27:17] Production.INFO: count ==522 [2025-03-02 03:27:17] Production.ERROR: pbx CDR StartTime 2025-03-02 00:27:05 - End Time 2025-03-02 03:27:05 [2025-03-02 03:27:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588369', 'tblTempUsageDetail_20' ) start [2025-03-02 03:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588369', 'tblTempUsageDetail_20' ) end [2025-03-02 03:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588369', 'tblTempVendorCDR_20' ) start [2025-03-02 03:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588369', 'tblTempVendorCDR_20' ) end [2025-03-02 03:27:17] Production.INFO: ProcessCDR(1,14588369,1,1,2) [2025-03-02 03:27:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588369,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:27:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588369,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:27:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588369,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:27:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588369,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:27:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588369', 'tblTempUsageDetail_20' ) start [2025-03-02 03:27:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588369', 'tblTempUsageDetail_20' ) end [2025-03-02 03:27:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:27:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:27:20] Production.INFO: ==29303== Releasing lock... [2025-03-02 03:27:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:27:20] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 03:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:28:05 [end_date_ymd] => 2025-03-02 03:28:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:28:05' and `end` < '2025-03-02 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-03-02 03:28:17] Production.INFO: count ==521 [2025-03-02 03:28:17] Production.ERROR: pbx CDR StartTime 2025-03-02 00:28:05 - End Time 2025-03-02 03:28:05 [2025-03-02 03:28:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588374', 'tblTempUsageDetail_20' ) start [2025-03-02 03:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588374', 'tblTempUsageDetail_20' ) end [2025-03-02 03:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588374', 'tblTempVendorCDR_20' ) start [2025-03-02 03:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588374', 'tblTempVendorCDR_20' ) end [2025-03-02 03:28:17] Production.INFO: ProcessCDR(1,14588374,1,1,2) [2025-03-02 03:28:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588374,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:28:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588374,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:28:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588374,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:28:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588374,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:28:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588374', 'tblTempUsageDetail_20' ) start [2025-03-02 03:28:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588374', 'tblTempUsageDetail_20' ) end [2025-03-02 03:28:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:28:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:28:21] Production.INFO: ==29382== Releasing lock... [2025-03-02 03:28:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:28:21] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 03:29:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:29:06 [end_date_ymd] => 2025-03-02 03:29:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:29:06' and `end` < '2025-03-02 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-03-02 03:29:18] Production.INFO: count ==518 [2025-03-02 03:29:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:29:06 - End Time 2025-03-02 03:29:06 [2025-03-02 03:29:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588379', 'tblTempUsageDetail_20' ) start [2025-03-02 03:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588379', 'tblTempUsageDetail_20' ) end [2025-03-02 03:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588379', 'tblTempVendorCDR_20' ) start [2025-03-02 03:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588379', 'tblTempVendorCDR_20' ) end [2025-03-02 03:29:18] Production.INFO: ProcessCDR(1,14588379,1,1,2) [2025-03-02 03:29:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588379,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:29:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588379,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:29:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588379,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:29:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588379,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:29:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588379', 'tblTempUsageDetail_20' ) start [2025-03-02 03:29:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588379', 'tblTempUsageDetail_20' ) end [2025-03-02 03:29:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:29:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:29:21] Production.INFO: ==29461== Releasing lock... [2025-03-02 03:29:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:29:21] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 03:30:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:30:06 [end_date_ymd] => 2025-03-02 03:30:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:30:06' and `end` < '2025-03-02 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-03-02 03:30:18] Production.INFO: count ==519 [2025-03-02 03:30:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:30:06 - End Time 2025-03-02 03:30:06 [2025-03-02 03:30:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588385', 'tblTempUsageDetail_20' ) start [2025-03-02 03:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588385', 'tblTempUsageDetail_20' ) end [2025-03-02 03:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588385', 'tblTempVendorCDR_20' ) start [2025-03-02 03:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588385', 'tblTempVendorCDR_20' ) end [2025-03-02 03:30:18] Production.INFO: ProcessCDR(1,14588385,1,1,2) [2025-03-02 03:30:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588385,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:30:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588385,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:30:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588385,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:30:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588385,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:30:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588385', 'tblTempUsageDetail_20' ) start [2025-03-02 03:30:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588385', 'tblTempUsageDetail_20' ) end [2025-03-02 03:30:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:30:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:30:21] Production.INFO: ==29581== Releasing lock... [2025-03-02 03:30:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:30:21] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 03:31:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:31:06 [end_date_ymd] => 2025-03-02 03:31:06 [RateCDR] => 1 ) [2025-03-02 03: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-03-02 00:31:06' and `end` < '2025-03-02 03: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-03-02 03:31:18] Production.INFO: count ==505 [2025-03-02 03:31:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:31:06 - End Time 2025-03-02 03:31:06 [2025-03-02 03:31:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588390', 'tblTempUsageDetail_20' ) start [2025-03-02 03:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588390', 'tblTempUsageDetail_20' ) end [2025-03-02 03:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588390', 'tblTempVendorCDR_20' ) start [2025-03-02 03:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588390', 'tblTempVendorCDR_20' ) end [2025-03-02 03:31:18] Production.INFO: ProcessCDR(1,14588390,1,1,2) [2025-03-02 03:31:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588390,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:31:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588390,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:31:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588390,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:31:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588390,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:31:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588390', 'tblTempUsageDetail_20' ) start [2025-03-02 03:31:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588390', 'tblTempUsageDetail_20' ) end [2025-03-02 03:31:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:31:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:31:22] Production.INFO: ==29668== Releasing lock... [2025-03-02 03:31:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:31:22] Production.INFO: 31 MB #Memory Used# [2025-03-02 03:32:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:32:05 [end_date_ymd] => 2025-03-02 03:32:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:32:05' and `end` < '2025-03-02 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-03-02 03:32:17] Production.INFO: count ==504 [2025-03-02 03:32:17] Production.ERROR: pbx CDR StartTime 2025-03-02 00:32:05 - End Time 2025-03-02 03:32:05 [2025-03-02 03:32:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588395', 'tblTempUsageDetail_20' ) start [2025-03-02 03:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588395', 'tblTempUsageDetail_20' ) end [2025-03-02 03:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588395', 'tblTempVendorCDR_20' ) start [2025-03-02 03:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588395', 'tblTempVendorCDR_20' ) end [2025-03-02 03:32:17] Production.INFO: ProcessCDR(1,14588395,1,1,2) [2025-03-02 03:32:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588395,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:32:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588395,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:32:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588395,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:32:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588395,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:32:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588395', 'tblTempUsageDetail_20' ) start [2025-03-02 03:32:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588395', 'tblTempUsageDetail_20' ) end [2025-03-02 03:32:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:32:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:32:21] Production.INFO: ==29747== Releasing lock... [2025-03-02 03:32:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:32:21] Production.INFO: 31 MB #Memory Used# [2025-03-02 03:33:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:33:06 [end_date_ymd] => 2025-03-02 03:33:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:33:06' and `end` < '2025-03-02 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-03-02 03:33:18] Production.INFO: count ==501 [2025-03-02 03:33:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:33:06 - End Time 2025-03-02 03:33:06 [2025-03-02 03:33:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588400', 'tblTempUsageDetail_20' ) start [2025-03-02 03:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588400', 'tblTempUsageDetail_20' ) end [2025-03-02 03:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588400', 'tblTempVendorCDR_20' ) start [2025-03-02 03:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588400', 'tblTempVendorCDR_20' ) end [2025-03-02 03:33:18] Production.INFO: ProcessCDR(1,14588400,1,1,2) [2025-03-02 03:33:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588400,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:33:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588400,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:33:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588400,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:33:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588400,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:33:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588400', 'tblTempUsageDetail_20' ) start [2025-03-02 03:33:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588400', 'tblTempUsageDetail_20' ) end [2025-03-02 03:33:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:33:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:33:21] Production.INFO: ==29823== Releasing lock... [2025-03-02 03:33:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:33:21] Production.INFO: 31 MB #Memory Used# [2025-03-02 03:34:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:34:06 [end_date_ymd] => 2025-03-02 03:34:06 [RateCDR] => 1 ) [2025-03-02 03: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-03-02 00:34:06' and `end` < '2025-03-02 03: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-03-02 03:34:18] Production.INFO: count ==500 [2025-03-02 03:34:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:34:06 - End Time 2025-03-02 03:34:06 [2025-03-02 03:34:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588405', 'tblTempUsageDetail_20' ) start [2025-03-02 03:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588405', 'tblTempUsageDetail_20' ) end [2025-03-02 03:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588405', 'tblTempVendorCDR_20' ) start [2025-03-02 03:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588405', 'tblTempVendorCDR_20' ) end [2025-03-02 03:34:18] Production.INFO: ProcessCDR(1,14588405,1,1,2) [2025-03-02 03:34:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588405,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:34:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588405,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:34:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588405,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:34:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588405,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:34:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588405', 'tblTempUsageDetail_20' ) start [2025-03-02 03:34:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588405', 'tblTempUsageDetail_20' ) end [2025-03-02 03:34:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:34:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:34:21] Production.INFO: ==29905== Releasing lock... [2025-03-02 03:34:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:34:21] Production.INFO: 31 MB #Memory Used# [2025-03-02 03:35:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:35:06 [end_date_ymd] => 2025-03-02 03:35:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:35:06' and `end` < '2025-03-02 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-03-02 03:35:18] Production.INFO: count ==500 [2025-03-02 03:35:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:35:06 - End Time 2025-03-02 03:35:06 [2025-03-02 03:35:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588410', 'tblTempUsageDetail_20' ) start [2025-03-02 03:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588410', 'tblTempUsageDetail_20' ) end [2025-03-02 03:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588410', 'tblTempVendorCDR_20' ) start [2025-03-02 03:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588410', 'tblTempVendorCDR_20' ) end [2025-03-02 03:35:18] Production.INFO: ProcessCDR(1,14588410,1,1,2) [2025-03-02 03:35:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588410,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:35:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588410,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:35:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588410,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:35:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588410,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:35:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588410', 'tblTempUsageDetail_20' ) start [2025-03-02 03:35:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588410', 'tblTempUsageDetail_20' ) end [2025-03-02 03:35:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:35:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:35:22] Production.INFO: ==29983== Releasing lock... [2025-03-02 03:35:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:35:22] Production.INFO: 31 MB #Memory Used# [2025-03-02 03:36:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:36:06 [end_date_ymd] => 2025-03-02 03:36:06 [RateCDR] => 1 ) [2025-03-02 03: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-03-02 00:36:06' and `end` < '2025-03-02 03: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-03-02 03:36:18] Production.INFO: count ==500 [2025-03-02 03:36:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:36:06 - End Time 2025-03-02 03:36:06 [2025-03-02 03:36:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:36:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588415', 'tblTempUsageDetail_20' ) start [2025-03-02 03:36:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588415', 'tblTempUsageDetail_20' ) end [2025-03-02 03:36:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588415', 'tblTempVendorCDR_20' ) start [2025-03-02 03:36:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588415', 'tblTempVendorCDR_20' ) end [2025-03-02 03:36:18] Production.INFO: ProcessCDR(1,14588415,1,1,2) [2025-03-02 03:36:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588415,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:36:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588415,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:36:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588415,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:36:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588415,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:36:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588415', 'tblTempUsageDetail_20' ) start [2025-03-02 03:36:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588415', 'tblTempUsageDetail_20' ) end [2025-03-02 03:36:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:36:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:36:22] Production.INFO: ==30062== Releasing lock... [2025-03-02 03:36:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:36:22] Production.INFO: 31 MB #Memory Used# [2025-03-02 03:37:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:37:06 [end_date_ymd] => 2025-03-02 03:37:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:37:06' and `end` < '2025-03-02 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-03-02 03:37:18] Production.INFO: count ==500 [2025-03-02 03:37:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:37:06 - End Time 2025-03-02 03:37:06 [2025-03-02 03:37:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588420', 'tblTempUsageDetail_20' ) start [2025-03-02 03:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588420', 'tblTempUsageDetail_20' ) end [2025-03-02 03:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588420', 'tblTempVendorCDR_20' ) start [2025-03-02 03:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588420', 'tblTempVendorCDR_20' ) end [2025-03-02 03:37:18] Production.INFO: ProcessCDR(1,14588420,1,1,2) [2025-03-02 03:37:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588420,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:37:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588420,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:37:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588420,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:37:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588420,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588420', 'tblTempUsageDetail_20' ) start [2025-03-02 03:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588420', 'tblTempUsageDetail_20' ) end [2025-03-02 03:37:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:37:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:37:21] Production.INFO: ==30144== Releasing lock... [2025-03-02 03:37:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:37:21] Production.INFO: 31 MB #Memory Used# [2025-03-02 03:38:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:38:06 [end_date_ymd] => 2025-03-02 03:38:06 [RateCDR] => 1 ) [2025-03-02 03: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-03-02 00:38:06' and `end` < '2025-03-02 03: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-03-02 03:38:18] Production.INFO: count ==497 [2025-03-02 03:38:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:38:06 - End Time 2025-03-02 03:38:06 [2025-03-02 03:38:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588425', 'tblTempUsageDetail_20' ) start [2025-03-02 03:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588425', 'tblTempUsageDetail_20' ) end [2025-03-02 03:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588425', 'tblTempVendorCDR_20' ) start [2025-03-02 03:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588425', 'tblTempVendorCDR_20' ) end [2025-03-02 03:38:18] Production.INFO: ProcessCDR(1,14588425,1,1,2) [2025-03-02 03:38:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588425,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:38:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588425,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:38:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588425,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:38:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588425,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:38:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588425', 'tblTempUsageDetail_20' ) start [2025-03-02 03:38:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588425', 'tblTempUsageDetail_20' ) end [2025-03-02 03:38:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:38:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:38:22] Production.INFO: ==30224== Releasing lock... [2025-03-02 03:38:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:38:22] Production.INFO: 31 MB #Memory Used# [2025-03-02 03:39:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:39:06 [end_date_ymd] => 2025-03-02 03:39:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:39:06' and `end` < '2025-03-02 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-03-02 03:39:18] Production.INFO: count ==497 [2025-03-02 03:39:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:39:06 - End Time 2025-03-02 03:39:06 [2025-03-02 03:39:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588430', 'tblTempUsageDetail_20' ) start [2025-03-02 03:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588430', 'tblTempUsageDetail_20' ) end [2025-03-02 03:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588430', 'tblTempVendorCDR_20' ) start [2025-03-02 03:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588430', 'tblTempVendorCDR_20' ) end [2025-03-02 03:39:18] Production.INFO: ProcessCDR(1,14588430,1,1,2) [2025-03-02 03:39:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588430,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:39:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588430,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:39:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588430,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:39:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588430,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:39:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588430', 'tblTempUsageDetail_20' ) start [2025-03-02 03:39:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588430', 'tblTempUsageDetail_20' ) end [2025-03-02 03:39:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:39:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:39:21] Production.INFO: ==30303== Releasing lock... [2025-03-02 03:39:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:39:21] Production.INFO: 31 MB #Memory Used# [2025-03-02 03:40:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:40:07 [end_date_ymd] => 2025-03-02 03:40:07 [RateCDR] => 1 ) [2025-03-02 03: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-03-02 00:40:07' and `end` < '2025-03-02 03: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-03-02 03:40:19] Production.INFO: count ==499 [2025-03-02 03:40:19] Production.ERROR: pbx CDR StartTime 2025-03-02 00:40:07 - End Time 2025-03-02 03:40:07 [2025-03-02 03:40:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588436', 'tblTempUsageDetail_20' ) start [2025-03-02 03:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588436', 'tblTempUsageDetail_20' ) end [2025-03-02 03:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588436', 'tblTempVendorCDR_20' ) start [2025-03-02 03:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588436', 'tblTempVendorCDR_20' ) end [2025-03-02 03:40:19] Production.INFO: ProcessCDR(1,14588436,1,1,2) [2025-03-02 03:40:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588436,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:40:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588436,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:40:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588436,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:40:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588436,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:40:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588436', 'tblTempUsageDetail_20' ) start [2025-03-02 03:40:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588436', 'tblTempUsageDetail_20' ) end [2025-03-02 03:40:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:40:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:40:23] Production.INFO: ==30381== Releasing lock... [2025-03-02 03:40:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:40:23] Production.INFO: 31 MB #Memory Used# [2025-03-02 03:41:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:41:06 [end_date_ymd] => 2025-03-02 03:41:06 [RateCDR] => 1 ) [2025-03-02 03: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-03-02 00:41:06' and `end` < '2025-03-02 03: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-03-02 03:41:18] Production.INFO: count ==484 [2025-03-02 03:41:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:41:06 - End Time 2025-03-02 03:41:06 [2025-03-02 03:41:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588441', 'tblTempUsageDetail_20' ) start [2025-03-02 03:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588441', 'tblTempUsageDetail_20' ) end [2025-03-02 03:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588441', 'tblTempVendorCDR_20' ) start [2025-03-02 03:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588441', 'tblTempVendorCDR_20' ) end [2025-03-02 03:41:18] Production.INFO: ProcessCDR(1,14588441,1,1,2) [2025-03-02 03:41:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588441,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:41:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588441,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:41:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588441,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:41:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588441,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:41:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588441', 'tblTempUsageDetail_20' ) start [2025-03-02 03:41:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588441', 'tblTempUsageDetail_20' ) end [2025-03-02 03:41:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:41:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:41:24] Production.INFO: ==30462== Releasing lock... [2025-03-02 03:41:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:41:24] Production.INFO: 31 MB #Memory Used# [2025-03-02 03:42:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:42:06 [end_date_ymd] => 2025-03-02 03:42:06 [RateCDR] => 1 ) [2025-03-02 03: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-03-02 00:42:06' and `end` < '2025-03-02 03: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-03-02 03:42:18] Production.INFO: count ==485 [2025-03-02 03:42:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:42:06 - End Time 2025-03-02 03:42:06 [2025-03-02 03:42:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588446', 'tblTempUsageDetail_20' ) start [2025-03-02 03:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588446', 'tblTempUsageDetail_20' ) end [2025-03-02 03:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588446', 'tblTempVendorCDR_20' ) start [2025-03-02 03:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588446', 'tblTempVendorCDR_20' ) end [2025-03-02 03:42:18] Production.INFO: ProcessCDR(1,14588446,1,1,2) [2025-03-02 03:42:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588446,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:42:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588446,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:42:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588446,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:42:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588446,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:42:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588446', 'tblTempUsageDetail_20' ) start [2025-03-02 03:42:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588446', 'tblTempUsageDetail_20' ) end [2025-03-02 03:42:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:42:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:42:24] Production.INFO: ==30539== Releasing lock... [2025-03-02 03:42:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:42:24] Production.INFO: 31 MB #Memory Used# [2025-03-02 03:43:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:43:05 [end_date_ymd] => 2025-03-02 03:43:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:43:05' and `end` < '2025-03-02 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-03-02 03:43:17] Production.INFO: count ==485 [2025-03-02 03:43:17] Production.ERROR: pbx CDR StartTime 2025-03-02 00:43:05 - End Time 2025-03-02 03:43:05 [2025-03-02 03:43:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588451', 'tblTempUsageDetail_20' ) start [2025-03-02 03:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588451', 'tblTempUsageDetail_20' ) end [2025-03-02 03:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588451', 'tblTempVendorCDR_20' ) start [2025-03-02 03:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588451', 'tblTempVendorCDR_20' ) end [2025-03-02 03:43:17] Production.INFO: ProcessCDR(1,14588451,1,1,2) [2025-03-02 03:43:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588451,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:43:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588451,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:43:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588451,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:43:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588451,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:43:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588451', 'tblTempUsageDetail_20' ) start [2025-03-02 03:43:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588451', 'tblTempUsageDetail_20' ) end [2025-03-02 03:43:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:43:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:43:21] Production.INFO: ==30613== Releasing lock... [2025-03-02 03:43:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:43:21] Production.INFO: 31 MB #Memory Used# [2025-03-02 03:44:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:44:06 [end_date_ymd] => 2025-03-02 03:44:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:44:06' and `end` < '2025-03-02 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-03-02 03:44:18] Production.INFO: count ==485 [2025-03-02 03:44:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:44:06 - End Time 2025-03-02 03:44:06 [2025-03-02 03:44:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588456', 'tblTempUsageDetail_20' ) start [2025-03-02 03:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588456', 'tblTempUsageDetail_20' ) end [2025-03-02 03:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588456', 'tblTempVendorCDR_20' ) start [2025-03-02 03:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588456', 'tblTempVendorCDR_20' ) end [2025-03-02 03:44:18] Production.INFO: ProcessCDR(1,14588456,1,1,2) [2025-03-02 03:44:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588456,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:44:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588456,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:44:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588456,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:44:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588456,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588456', 'tblTempUsageDetail_20' ) start [2025-03-02 03:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588456', 'tblTempUsageDetail_20' ) end [2025-03-02 03:44:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:44:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:44:21] Production.INFO: ==30689== Releasing lock... [2025-03-02 03:44:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:44:21] Production.INFO: 31 MB #Memory Used# [2025-03-02 03:45:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:45:06 [end_date_ymd] => 2025-03-02 03:45:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:45:06' and `end` < '2025-03-02 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-03-02 03:45:18] Production.INFO: count ==482 [2025-03-02 03:45:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:45:06 - End Time 2025-03-02 03:45:06 [2025-03-02 03:45:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:45:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588461', 'tblTempUsageDetail_20' ) start [2025-03-02 03:45:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588461', 'tblTempUsageDetail_20' ) end [2025-03-02 03:45:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588461', 'tblTempVendorCDR_20' ) start [2025-03-02 03:45:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588461', 'tblTempVendorCDR_20' ) end [2025-03-02 03:45:18] Production.INFO: ProcessCDR(1,14588461,1,1,2) [2025-03-02 03:45:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588461,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:45:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588461,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:45:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588461,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:45:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588461,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:45:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588461', 'tblTempUsageDetail_20' ) start [2025-03-02 03:45:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588461', 'tblTempUsageDetail_20' ) end [2025-03-02 03:45:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:45:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:45:22] Production.INFO: ==30774== Releasing lock... [2025-03-02 03:45:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:45:22] Production.INFO: 31 MB #Memory Used# [2025-03-02 03:46:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:46:05 [end_date_ymd] => 2025-03-02 03:46:05 [RateCDR] => 1 ) [2025-03-02 03: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-03-02 00:46:05' and `end` < '2025-03-02 03: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-03-02 03:46:18] Production.INFO: count ==481 [2025-03-02 03:46:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:46:05 - End Time 2025-03-02 03:46:05 [2025-03-02 03:46:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588465', 'tblTempUsageDetail_20' ) start [2025-03-02 03:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588465', 'tblTempUsageDetail_20' ) end [2025-03-02 03:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588465', 'tblTempVendorCDR_20' ) start [2025-03-02 03:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588465', 'tblTempVendorCDR_20' ) end [2025-03-02 03:46:18] Production.INFO: ProcessCDR(1,14588465,1,1,2) [2025-03-02 03:46:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588465,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:46:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588465,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:46:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588465,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:46:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588465,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588465', 'tblTempUsageDetail_20' ) start [2025-03-02 03:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588465', 'tblTempUsageDetail_20' ) end [2025-03-02 03:46:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:46:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:46:21] Production.INFO: ==30888== Releasing lock... [2025-03-02 03:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:46:21] Production.INFO: 31 MB #Memory Used# [2025-03-02 03:47:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:47:06 [end_date_ymd] => 2025-03-02 03:47:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:47:06' and `end` < '2025-03-02 03: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-03-02 03:47:18] Production.INFO: count ==478 [2025-03-02 03:47:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:47:06 - End Time 2025-03-02 03:47:06 [2025-03-02 03:47:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588471', 'tblTempUsageDetail_20' ) start [2025-03-02 03:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588471', 'tblTempUsageDetail_20' ) end [2025-03-02 03:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588471', 'tblTempVendorCDR_20' ) start [2025-03-02 03:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588471', 'tblTempVendorCDR_20' ) end [2025-03-02 03:47:18] Production.INFO: ProcessCDR(1,14588471,1,1,2) [2025-03-02 03:47:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588471,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:47:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588471,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:47:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588471,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:47:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588471,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:47:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588471', 'tblTempUsageDetail_20' ) start [2025-03-02 03:47:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588471', 'tblTempUsageDetail_20' ) end [2025-03-02 03:47:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:47:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:47:21] Production.INFO: ==30965== Releasing lock... [2025-03-02 03:47:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:47:21] Production.INFO: 31 MB #Memory Used# [2025-03-02 03:48:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:48:06 [end_date_ymd] => 2025-03-02 03:48:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:48:06' and `end` < '2025-03-02 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-03-02 03:48:18] Production.INFO: count ==476 [2025-03-02 03:48:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:48:06 - End Time 2025-03-02 03:48:06 [2025-03-02 03:48:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588476', 'tblTempUsageDetail_20' ) start [2025-03-02 03:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588476', 'tblTempUsageDetail_20' ) end [2025-03-02 03:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588476', 'tblTempVendorCDR_20' ) start [2025-03-02 03:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588476', 'tblTempVendorCDR_20' ) end [2025-03-02 03:48:18] Production.INFO: ProcessCDR(1,14588476,1,1,2) [2025-03-02 03:48:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588476,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:48:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588476,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:48:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588476,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:48:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588476,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:48:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588476', 'tblTempUsageDetail_20' ) start [2025-03-02 03:48:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588476', 'tblTempUsageDetail_20' ) end [2025-03-02 03:48:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:48:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:48:22] Production.INFO: ==31042== Releasing lock... [2025-03-02 03:48:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:48:22] Production.INFO: 31 MB #Memory Used# [2025-03-02 03:49:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:49:06 [end_date_ymd] => 2025-03-02 03:49:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:49:06' and `end` < '2025-03-02 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-03-02 03:49:18] Production.INFO: count ==476 [2025-03-02 03:49:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:49:06 - End Time 2025-03-02 03:49:06 [2025-03-02 03:49:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588481', 'tblTempUsageDetail_20' ) start [2025-03-02 03:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588481', 'tblTempUsageDetail_20' ) end [2025-03-02 03:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588481', 'tblTempVendorCDR_20' ) start [2025-03-02 03:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588481', 'tblTempVendorCDR_20' ) end [2025-03-02 03:49:18] Production.INFO: ProcessCDR(1,14588481,1,1,2) [2025-03-02 03:49:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588481,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:49:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588481,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:49:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588481,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:49:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588481,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:49:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588481', 'tblTempUsageDetail_20' ) start [2025-03-02 03:49:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588481', 'tblTempUsageDetail_20' ) end [2025-03-02 03:49:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:49:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:49:22] Production.INFO: ==31122== Releasing lock... [2025-03-02 03:49:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:49:22] Production.INFO: 31 MB #Memory Used# [2025-03-02 03:50:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:50:06 [end_date_ymd] => 2025-03-02 03:50:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:50:06' and `end` < '2025-03-02 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-03-02 03:50:18] Production.INFO: count ==469 [2025-03-02 03:50:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:50:06 - End Time 2025-03-02 03:50:06 [2025-03-02 03:50:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588487', 'tblTempUsageDetail_20' ) start [2025-03-02 03:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588487', 'tblTempUsageDetail_20' ) end [2025-03-02 03:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588487', 'tblTempVendorCDR_20' ) start [2025-03-02 03:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588487', 'tblTempVendorCDR_20' ) end [2025-03-02 03:50:18] Production.INFO: ProcessCDR(1,14588487,1,1,2) [2025-03-02 03:50:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588487,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:50:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588487,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:50:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588487,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:50:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588487,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:50:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588487', 'tblTempUsageDetail_20' ) start [2025-03-02 03:50:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588487', 'tblTempUsageDetail_20' ) end [2025-03-02 03:50:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:50:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:50:22] Production.INFO: ==31202== Releasing lock... [2025-03-02 03:50:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:50:22] Production.INFO: 30.75 MB #Memory Used# [2025-03-02 03:51:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:51:06 [end_date_ymd] => 2025-03-02 03:51:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:51:06' and `end` < '2025-03-02 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-03-02 03:51:18] Production.INFO: count ==437 [2025-03-02 03:51:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:51:06 - End Time 2025-03-02 03:51:06 [2025-03-02 03:51:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588492', 'tblTempUsageDetail_20' ) start [2025-03-02 03:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588492', 'tblTempUsageDetail_20' ) end [2025-03-02 03:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588492', 'tblTempVendorCDR_20' ) start [2025-03-02 03:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588492', 'tblTempVendorCDR_20' ) end [2025-03-02 03:51:18] Production.INFO: ProcessCDR(1,14588492,1,1,2) [2025-03-02 03:51:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588492,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:51:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588492,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:51:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588492,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:51:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588492,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:51:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588492', 'tblTempUsageDetail_20' ) start [2025-03-02 03:51:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588492', 'tblTempUsageDetail_20' ) end [2025-03-02 03:51:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:51:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:51:21] Production.INFO: ==31279== Releasing lock... [2025-03-02 03:51:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:51:21] Production.INFO: 30.5 MB #Memory Used# [2025-03-02 03:52:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:52:05 [end_date_ymd] => 2025-03-02 03:52:05 [RateCDR] => 1 ) [2025-03-02 03: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-03-02 00:52:05' and `end` < '2025-03-02 03: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-03-02 03:52:17] Production.INFO: count ==433 [2025-03-02 03:52:17] Production.ERROR: pbx CDR StartTime 2025-03-02 00:52:05 - End Time 2025-03-02 03:52:05 [2025-03-02 03:52:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588497', 'tblTempUsageDetail_20' ) start [2025-03-02 03:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588497', 'tblTempUsageDetail_20' ) end [2025-03-02 03:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588497', 'tblTempVendorCDR_20' ) start [2025-03-02 03:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588497', 'tblTempVendorCDR_20' ) end [2025-03-02 03:52:17] Production.INFO: ProcessCDR(1,14588497,1,1,2) [2025-03-02 03:52:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588497,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:52:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588497,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:52:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588497,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:52:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588497,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:52:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588497', 'tblTempUsageDetail_20' ) start [2025-03-02 03:52:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588497', 'tblTempUsageDetail_20' ) end [2025-03-02 03:52:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:52:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:52:21] Production.INFO: ==31358== Releasing lock... [2025-03-02 03:52:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:52:21] Production.INFO: 30.5 MB #Memory Used# [2025-03-02 03:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:53:05 [end_date_ymd] => 2025-03-02 03:53:05 [RateCDR] => 1 ) [2025-03-02 03: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-03-02 00:53:05' and `end` < '2025-03-02 03: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-03-02 03:53:17] Production.INFO: count ==428 [2025-03-02 03:53:17] Production.ERROR: pbx CDR StartTime 2025-03-02 00:53:05 - End Time 2025-03-02 03:53:05 [2025-03-02 03:53:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588502', 'tblTempUsageDetail_20' ) start [2025-03-02 03:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588502', 'tblTempUsageDetail_20' ) end [2025-03-02 03:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588502', 'tblTempVendorCDR_20' ) start [2025-03-02 03:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588502', 'tblTempVendorCDR_20' ) end [2025-03-02 03:53:17] Production.INFO: ProcessCDR(1,14588502,1,1,2) [2025-03-02 03:53:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588502,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:53:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588502,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:53:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588502,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:53:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588502,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588502', 'tblTempUsageDetail_20' ) start [2025-03-02 03:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588502', 'tblTempUsageDetail_20' ) end [2025-03-02 03:53:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:53:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:53:21] Production.INFO: ==31437== Releasing lock... [2025-03-02 03:53:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:53:21] Production.INFO: 30.5 MB #Memory Used# [2025-03-02 03:54:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:54:05 [end_date_ymd] => 2025-03-02 03:54:05 [RateCDR] => 1 ) [2025-03-02 03: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-03-02 00:54:05' and `end` < '2025-03-02 03: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-03-02 03:54:17] Production.INFO: count ==426 [2025-03-02 03:54:17] Production.ERROR: pbx CDR StartTime 2025-03-02 00:54:05 - End Time 2025-03-02 03:54:05 [2025-03-02 03:54:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588507', 'tblTempUsageDetail_20' ) start [2025-03-02 03:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588507', 'tblTempUsageDetail_20' ) end [2025-03-02 03:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588507', 'tblTempVendorCDR_20' ) start [2025-03-02 03:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588507', 'tblTempVendorCDR_20' ) end [2025-03-02 03:54:17] Production.INFO: ProcessCDR(1,14588507,1,1,2) [2025-03-02 03:54:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588507,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:54:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588507,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:54:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588507,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:54:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588507,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:54:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588507', 'tblTempUsageDetail_20' ) start [2025-03-02 03:54:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588507', 'tblTempUsageDetail_20' ) end [2025-03-02 03:54:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:54:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:54:22] Production.INFO: ==31512== Releasing lock... [2025-03-02 03:54:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:54:22] Production.INFO: 30.5 MB #Memory Used# [2025-03-02 03:55:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:55:07 [end_date_ymd] => 2025-03-02 03:55:07 [RateCDR] => 1 ) [2025-03-02 03:55: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-03-02 00:55:07' and `end` < '2025-03-02 03:55: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-03-02 03:55:18] Production.INFO: count ==426 [2025-03-02 03:55:19] Production.ERROR: pbx CDR StartTime 2025-03-02 00:55:07 - End Time 2025-03-02 03:55:07 [2025-03-02 03:55:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:55:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588512', 'tblTempUsageDetail_20' ) start [2025-03-02 03:55:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588512', 'tblTempUsageDetail_20' ) end [2025-03-02 03:55:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588512', 'tblTempVendorCDR_20' ) start [2025-03-02 03:55:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588512', 'tblTempVendorCDR_20' ) end [2025-03-02 03:55:19] Production.INFO: ProcessCDR(1,14588512,1,1,2) [2025-03-02 03:55:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588512,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:55:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588512,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:55:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588512,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:55:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588512,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:55:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588512', 'tblTempUsageDetail_20' ) start [2025-03-02 03:55:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588512', 'tblTempUsageDetail_20' ) end [2025-03-02 03:55:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:55:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:55:22] Production.INFO: ==31587== Releasing lock... [2025-03-02 03:55:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:55:22] Production.INFO: 30.5 MB #Memory Used# [2025-03-02 03:56:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:56:06 [end_date_ymd] => 2025-03-02 03:56:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:56:06' and `end` < '2025-03-02 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-03-02 03:56:18] Production.INFO: count ==427 [2025-03-02 03:56:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:56:06 - End Time 2025-03-02 03:56:06 [2025-03-02 03:56:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588517', 'tblTempUsageDetail_20' ) start [2025-03-02 03:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588517', 'tblTempUsageDetail_20' ) end [2025-03-02 03:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588517', 'tblTempVendorCDR_20' ) start [2025-03-02 03:56:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588517', 'tblTempVendorCDR_20' ) end [2025-03-02 03:56:19] Production.INFO: ProcessCDR(1,14588517,1,1,2) [2025-03-02 03:56:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588517,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:56:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588517,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:56:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588517,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:56:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588517,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:56:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588517', 'tblTempUsageDetail_20' ) start [2025-03-02 03:56:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588517', 'tblTempUsageDetail_20' ) end [2025-03-02 03:56:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:56:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:56:24] Production.INFO: ==31662== Releasing lock... [2025-03-02 03:56:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:56:24] Production.INFO: 30.5 MB #Memory Used# [2025-03-02 03:57:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:57:05 [end_date_ymd] => 2025-03-02 03:57:05 [RateCDR] => 1 ) [2025-03-02 03: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-03-02 00:57:05' and `end` < '2025-03-02 03: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-03-02 03:57:17] Production.INFO: count ==420 [2025-03-02 03:57:17] Production.ERROR: pbx CDR StartTime 2025-03-02 00:57:05 - End Time 2025-03-02 03:57:05 [2025-03-02 03:57:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588522', 'tblTempUsageDetail_20' ) start [2025-03-02 03:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588522', 'tblTempUsageDetail_20' ) end [2025-03-02 03:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588522', 'tblTempVendorCDR_20' ) start [2025-03-02 03:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588522', 'tblTempVendorCDR_20' ) end [2025-03-02 03:57:17] Production.INFO: ProcessCDR(1,14588522,1,1,2) [2025-03-02 03:57:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588522,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:57:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588522,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:57:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588522,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:57:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588522,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:57:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588522', 'tblTempUsageDetail_20' ) start [2025-03-02 03:57:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588522', 'tblTempUsageDetail_20' ) end [2025-03-02 03:57:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:57:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:57:21] Production.INFO: ==31738== Releasing lock... [2025-03-02 03:57:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:57:21] Production.INFO: 30.5 MB #Memory Used# [2025-03-02 03:58:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:58:06 [end_date_ymd] => 2025-03-02 03:58:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 00:58:06' and `end` < '2025-03-02 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-03-02 03:58:17] Production.INFO: count ==420 [2025-03-02 03:58:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:58:06 - End Time 2025-03-02 03:58:06 [2025-03-02 03:58:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588527', 'tblTempUsageDetail_20' ) start [2025-03-02 03:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588527', 'tblTempUsageDetail_20' ) end [2025-03-02 03:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588527', 'tblTempVendorCDR_20' ) start [2025-03-02 03:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588527', 'tblTempVendorCDR_20' ) end [2025-03-02 03:58:18] Production.INFO: ProcessCDR(1,14588527,1,1,2) [2025-03-02 03:58:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588527,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:58:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588527,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:58:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588527,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:58:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588527,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:58:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588527', 'tblTempUsageDetail_20' ) start [2025-03-02 03:58:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588527', 'tblTempUsageDetail_20' ) end [2025-03-02 03:58:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:58:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:58:21] Production.INFO: ==31814== Releasing lock... [2025-03-02 03:58:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:58:21] Production.INFO: 30.5 MB #Memory Used# [2025-03-02 03:59:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 00:59:06 [end_date_ymd] => 2025-03-02 03:59:06 [RateCDR] => 1 ) [2025-03-02 03: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-03-02 00:59:06' and `end` < '2025-03-02 03: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-03-02 03:59:18] Production.INFO: count ==424 [2025-03-02 03:59:18] Production.ERROR: pbx CDR StartTime 2025-03-02 00:59:06 - End Time 2025-03-02 03:59:06 [2025-03-02 03:59:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 03:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588532', 'tblTempUsageDetail_20' ) start [2025-03-02 03:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588532', 'tblTempUsageDetail_20' ) end [2025-03-02 03:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588532', 'tblTempVendorCDR_20' ) start [2025-03-02 03:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588532', 'tblTempVendorCDR_20' ) end [2025-03-02 03:59:18] Production.INFO: ProcessCDR(1,14588532,1,1,2) [2025-03-02 03:59:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588532,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:59:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588532,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 03:59:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588532,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:59:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588532,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 03:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588532', 'tblTempUsageDetail_20' ) start [2025-03-02 03:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588532', 'tblTempUsageDetail_20' ) end [2025-03-02 03:59:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 03:59:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 03:59:21] Production.INFO: ==31891== Releasing lock... [2025-03-02 03:59:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 03:59:21] Production.INFO: 30.5 MB #Memory Used# [2025-03-02 04:00:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:00:07 [end_date_ymd] => 2025-03-02 04:00:07 [RateCDR] => 1 ) [2025-03-02 04: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-03-02 01:00:07' and `end` < '2025-03-02 04: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-03-02 04:00:19] Production.INFO: count ==426 [2025-03-02 04:00:19] Production.ERROR: pbx CDR StartTime 2025-03-02 01:00:07 - End Time 2025-03-02 04:00:07 [2025-03-02 04:00:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:00:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588539', 'tblTempUsageDetail_20' ) start [2025-03-02 04:00:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588539', 'tblTempUsageDetail_20' ) end [2025-03-02 04:00:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588539', 'tblTempVendorCDR_20' ) start [2025-03-02 04:00:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588539', 'tblTempVendorCDR_20' ) end [2025-03-02 04:00:19] Production.INFO: ProcessCDR(1,14588539,1,1,2) [2025-03-02 04:00:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588539,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:00:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588539,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:00:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588539,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:00:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588539,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:00:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588539', 'tblTempUsageDetail_20' ) start [2025-03-02 04:00:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588539', 'tblTempUsageDetail_20' ) end [2025-03-02 04:00:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:00:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:00:24] Production.INFO: ==31971== Releasing lock... [2025-03-02 04:00:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:00:24] Production.INFO: 30.5 MB #Memory Used# [2025-03-02 04:01:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:01:05 [end_date_ymd] => 2025-03-02 04:01:05 [RateCDR] => 1 ) [2025-03-02 04: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-03-02 01:01:05' and `end` < '2025-03-02 04: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-03-02 04:01:17] Production.INFO: count ==386 [2025-03-02 04:01:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:01:05 - End Time 2025-03-02 04:01:05 [2025-03-02 04:01:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588544', 'tblTempUsageDetail_20' ) start [2025-03-02 04:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588544', 'tblTempUsageDetail_20' ) end [2025-03-02 04:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588544', 'tblTempVendorCDR_20' ) start [2025-03-02 04:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588544', 'tblTempVendorCDR_20' ) end [2025-03-02 04:01:17] Production.INFO: ProcessCDR(1,14588544,1,1,2) [2025-03-02 04:01:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588544,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:01:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588544,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:01:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588544,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:01:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588544,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588544', 'tblTempUsageDetail_20' ) start [2025-03-02 04:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588544', 'tblTempUsageDetail_20' ) end [2025-03-02 04:01:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:01:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:01:21] Production.INFO: ==32101== Releasing lock... [2025-03-02 04:01:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:01:21] Production.INFO: 30.25 MB #Memory Used# [2025-03-02 04:02:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:02:05 [end_date_ymd] => 2025-03-02 04:02:05 [RateCDR] => 1 ) [2025-03-02 04: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-03-02 01:02:05' and `end` < '2025-03-02 04: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-03-02 04:02:18] Production.INFO: count ==386 [2025-03-02 04:02:18] Production.ERROR: pbx CDR StartTime 2025-03-02 01:02:05 - End Time 2025-03-02 04:02:05 [2025-03-02 04:02:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588549', 'tblTempUsageDetail_20' ) start [2025-03-02 04:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588549', 'tblTempUsageDetail_20' ) end [2025-03-02 04:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588549', 'tblTempVendorCDR_20' ) start [2025-03-02 04:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588549', 'tblTempVendorCDR_20' ) end [2025-03-02 04:02:18] Production.INFO: ProcessCDR(1,14588549,1,1,2) [2025-03-02 04:02:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588549,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:02:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588549,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:02:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588549,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:02:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588549,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:02:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588549', 'tblTempUsageDetail_20' ) start [2025-03-02 04:02:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588549', 'tblTempUsageDetail_20' ) end [2025-03-02 04:02:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:02:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:02:21] Production.INFO: ==32178== Releasing lock... [2025-03-02 04:02:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:02:21] Production.INFO: 30.25 MB #Memory Used# [2025-03-02 04:03:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:03:05 [end_date_ymd] => 2025-03-02 04:03:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:03:05' and `end` < '2025-03-02 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-03-02 04:03:17] Production.INFO: count ==386 [2025-03-02 04:03:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:03:05 - End Time 2025-03-02 04:03:05 [2025-03-02 04:03:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588554', 'tblTempUsageDetail_20' ) start [2025-03-02 04:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588554', 'tblTempUsageDetail_20' ) end [2025-03-02 04:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588554', 'tblTempVendorCDR_20' ) start [2025-03-02 04:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588554', 'tblTempVendorCDR_20' ) end [2025-03-02 04:03:17] Production.INFO: ProcessCDR(1,14588554,1,1,2) [2025-03-02 04:03:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588554,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:03:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588554,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:03:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588554,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:03:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588554,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:03:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588554', 'tblTempUsageDetail_20' ) start [2025-03-02 04:03:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588554', 'tblTempUsageDetail_20' ) end [2025-03-02 04:03:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:03:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:03:21] Production.INFO: ==32251== Releasing lock... [2025-03-02 04:03:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:03:21] Production.INFO: 30.25 MB #Memory Used# [2025-03-02 04:04:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:04:05 [end_date_ymd] => 2025-03-02 04:04:05 [RateCDR] => 1 ) [2025-03-02 04: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-03-02 01:04:05' and `end` < '2025-03-02 04: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-03-02 04:04:17] Production.INFO: count ==384 [2025-03-02 04:04:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:04:05 - End Time 2025-03-02 04:04:05 [2025-03-02 04:04:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588559', 'tblTempUsageDetail_20' ) start [2025-03-02 04:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588559', 'tblTempUsageDetail_20' ) end [2025-03-02 04:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588559', 'tblTempVendorCDR_20' ) start [2025-03-02 04:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588559', 'tblTempVendorCDR_20' ) end [2025-03-02 04:04:17] Production.INFO: ProcessCDR(1,14588559,1,1,2) [2025-03-02 04:04:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588559,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:04:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588559,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:04:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588559,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:04:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588559,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:04:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588559', 'tblTempUsageDetail_20' ) start [2025-03-02 04:04:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588559', 'tblTempUsageDetail_20' ) end [2025-03-02 04:04:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:04:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:04:20] Production.INFO: ==32335== Releasing lock... [2025-03-02 04:04:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:04:20] Production.INFO: 30.25 MB #Memory Used# [2025-03-02 04:05:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:05:06 [end_date_ymd] => 2025-03-02 04:05:06 [RateCDR] => 1 ) [2025-03-02 04: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-03-02 01:05:06' and `end` < '2025-03-02 04: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-03-02 04:05:18] Production.INFO: count ==384 [2025-03-02 04:05:18] Production.ERROR: pbx CDR StartTime 2025-03-02 01:05:06 - End Time 2025-03-02 04:05:06 [2025-03-02 04:05:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588564', 'tblTempUsageDetail_20' ) start [2025-03-02 04:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588564', 'tblTempUsageDetail_20' ) end [2025-03-02 04:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588564', 'tblTempVendorCDR_20' ) start [2025-03-02 04:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588564', 'tblTempVendorCDR_20' ) end [2025-03-02 04:05:18] Production.INFO: ProcessCDR(1,14588564,1,1,2) [2025-03-02 04:05:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588564,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:05:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588564,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:05:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588564,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:05:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588564,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:05:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588564', 'tblTempUsageDetail_20' ) start [2025-03-02 04:05:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588564', 'tblTempUsageDetail_20' ) end [2025-03-02 04:05:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:05:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:05:21] Production.INFO: ==32412== Releasing lock... [2025-03-02 04:05:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:05:21] Production.INFO: 30.25 MB #Memory Used# [2025-03-02 04:06:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:06:05 [end_date_ymd] => 2025-03-02 04:06:05 [RateCDR] => 1 ) [2025-03-02 04: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-03-02 01:06:05' and `end` < '2025-03-02 04: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-03-02 04:06:17] Production.INFO: count ==384 [2025-03-02 04:06:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:06:05 - End Time 2025-03-02 04:06:05 [2025-03-02 04:06:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588569', 'tblTempUsageDetail_20' ) start [2025-03-02 04:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588569', 'tblTempUsageDetail_20' ) end [2025-03-02 04:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588569', 'tblTempVendorCDR_20' ) start [2025-03-02 04:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588569', 'tblTempVendorCDR_20' ) end [2025-03-02 04:06:17] Production.INFO: ProcessCDR(1,14588569,1,1,2) [2025-03-02 04:06:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588569,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:06:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588569,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:06:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588569,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:06:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588569,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:06:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588569', 'tblTempUsageDetail_20' ) start [2025-03-02 04:06:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588569', 'tblTempUsageDetail_20' ) end [2025-03-02 04:06:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:06:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:06:20] Production.INFO: ==32490== Releasing lock... [2025-03-02 04:06:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:06:20] Production.INFO: 30.25 MB #Memory Used# [2025-03-02 04:07:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:07:06 [end_date_ymd] => 2025-03-02 04:07:06 [RateCDR] => 1 ) [2025-03-02 04: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-03-02 01:07:06' and `end` < '2025-03-02 04: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-03-02 04:07:17] Production.INFO: count ==383 [2025-03-02 04:07:18] Production.ERROR: pbx CDR StartTime 2025-03-02 01:07:06 - End Time 2025-03-02 04:07:06 [2025-03-02 04:07:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588574', 'tblTempUsageDetail_20' ) start [2025-03-02 04:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588574', 'tblTempUsageDetail_20' ) end [2025-03-02 04:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588574', 'tblTempVendorCDR_20' ) start [2025-03-02 04:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588574', 'tblTempVendorCDR_20' ) end [2025-03-02 04:07:18] Production.INFO: ProcessCDR(1,14588574,1,1,2) [2025-03-02 04:07:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588574,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:07:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588574,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:07:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588574,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:07:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588574,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:07:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588574', 'tblTempUsageDetail_20' ) start [2025-03-02 04:07:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588574', 'tblTempUsageDetail_20' ) end [2025-03-02 04:07:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:07:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:07:21] Production.INFO: ==32570== Releasing lock... [2025-03-02 04:07:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:07:21] Production.INFO: 30.25 MB #Memory Used# [2025-03-02 04:08:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:08:05 [end_date_ymd] => 2025-03-02 04:08:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:08:05' and `end` < '2025-03-02 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-03-02 04:08:16] Production.INFO: count ==381 [2025-03-02 04:08:16] Production.ERROR: pbx CDR StartTime 2025-03-02 01:08:05 - End Time 2025-03-02 04:08:05 [2025-03-02 04:08:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588579', 'tblTempUsageDetail_20' ) start [2025-03-02 04:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588579', 'tblTempUsageDetail_20' ) end [2025-03-02 04:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588579', 'tblTempVendorCDR_20' ) start [2025-03-02 04:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588579', 'tblTempVendorCDR_20' ) end [2025-03-02 04:08:17] Production.INFO: ProcessCDR(1,14588579,1,1,2) [2025-03-02 04:08:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588579,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:08:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588579,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:08:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588579,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:08:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588579,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:08:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588579', 'tblTempUsageDetail_20' ) start [2025-03-02 04:08:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588579', 'tblTempUsageDetail_20' ) end [2025-03-02 04:08:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:08:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:08:20] Production.INFO: ==32648== Releasing lock... [2025-03-02 04:08:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:08:20] Production.INFO: 30.25 MB #Memory Used# [2025-03-02 04:09:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:09:05 [end_date_ymd] => 2025-03-02 04:09:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:09:05' and `end` < '2025-03-02 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-03-02 04:09:17] Production.INFO: count ==380 [2025-03-02 04:09:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:09:05 - End Time 2025-03-02 04:09:05 [2025-03-02 04:09:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588584', 'tblTempUsageDetail_20' ) start [2025-03-02 04:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588584', 'tblTempUsageDetail_20' ) end [2025-03-02 04:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588584', 'tblTempVendorCDR_20' ) start [2025-03-02 04:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588584', 'tblTempVendorCDR_20' ) end [2025-03-02 04:09:17] Production.INFO: ProcessCDR(1,14588584,1,1,2) [2025-03-02 04:09:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588584,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:09:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588584,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:09:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588584,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:09:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588584,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:09:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588584', 'tblTempUsageDetail_20' ) start [2025-03-02 04:09:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588584', 'tblTempUsageDetail_20' ) end [2025-03-02 04:09:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:09:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:09:21] Production.INFO: ==32726== Releasing lock... [2025-03-02 04:09:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:09:21] Production.INFO: 30 MB #Memory Used# [2025-03-02 04:10:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:10:06 [end_date_ymd] => 2025-03-02 04:10:06 [RateCDR] => 1 ) [2025-03-02 04: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-03-02 01:10:06' and `end` < '2025-03-02 04: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-03-02 04:10:18] Production.INFO: count ==376 [2025-03-02 04:10:18] Production.ERROR: pbx CDR StartTime 2025-03-02 01:10:06 - End Time 2025-03-02 04:10:06 [2025-03-02 04:10:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588590', 'tblTempUsageDetail_20' ) start [2025-03-02 04:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588590', 'tblTempUsageDetail_20' ) end [2025-03-02 04:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588590', 'tblTempVendorCDR_20' ) start [2025-03-02 04:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588590', 'tblTempVendorCDR_20' ) end [2025-03-02 04:10:18] Production.INFO: ProcessCDR(1,14588590,1,1,2) [2025-03-02 04:10:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588590,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:10:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588590,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:10:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588590,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:10:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588590,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:10:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588590', 'tblTempUsageDetail_20' ) start [2025-03-02 04:10:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588590', 'tblTempUsageDetail_20' ) end [2025-03-02 04:10:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:10:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:10:21] Production.INFO: ==361== Releasing lock... [2025-03-02 04:10:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:10:21] Production.INFO: 30 MB #Memory Used# [2025-03-02 04:11:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:11:05 [end_date_ymd] => 2025-03-02 04:11:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:11:05' and `end` < '2025-03-02 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-03-02 04:11:17] Production.INFO: count ==358 [2025-03-02 04:11:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:11:05 - End Time 2025-03-02 04:11:05 [2025-03-02 04:11:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588595', 'tblTempUsageDetail_20' ) start [2025-03-02 04:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588595', 'tblTempUsageDetail_20' ) end [2025-03-02 04:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588595', 'tblTempVendorCDR_20' ) start [2025-03-02 04:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588595', 'tblTempVendorCDR_20' ) end [2025-03-02 04:11:17] Production.INFO: ProcessCDR(1,14588595,1,1,2) [2025-03-02 04:11:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588595,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:11:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588595,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:11:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588595,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:11:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588595,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:11:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588595', 'tblTempUsageDetail_20' ) start [2025-03-02 04:11:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588595', 'tblTempUsageDetail_20' ) end [2025-03-02 04:11:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:11:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:11:20] Production.INFO: ==442== Releasing lock... [2025-03-02 04:11:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:11:20] Production.INFO: 30.25 MB #Memory Used# [2025-03-02 04:12:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:12:05 [end_date_ymd] => 2025-03-02 04:12:05 [RateCDR] => 1 ) [2025-03-02 04: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-03-02 01:12:05' and `end` < '2025-03-02 04: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-03-02 04:12:17] Production.INFO: count ==358 [2025-03-02 04:12:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:12:05 - End Time 2025-03-02 04:12:05 [2025-03-02 04:12:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588600', 'tblTempUsageDetail_20' ) start [2025-03-02 04:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588600', 'tblTempUsageDetail_20' ) end [2025-03-02 04:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588600', 'tblTempVendorCDR_20' ) start [2025-03-02 04:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588600', 'tblTempVendorCDR_20' ) end [2025-03-02 04:12:17] Production.INFO: ProcessCDR(1,14588600,1,1,2) [2025-03-02 04:12:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588600,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:12:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588600,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:12:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588600,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:12:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588600,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:12:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588600', 'tblTempUsageDetail_20' ) start [2025-03-02 04:12:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588600', 'tblTempUsageDetail_20' ) end [2025-03-02 04:12:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:12:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:12:20] Production.INFO: ==520== Releasing lock... [2025-03-02 04:12:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:12:20] Production.INFO: 30.25 MB #Memory Used# [2025-03-02 04:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:13:05 [end_date_ymd] => 2025-03-02 04:13:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:13:05' and `end` < '2025-03-02 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-03-02 04:13:17] Production.INFO: count ==356 [2025-03-02 04:13:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:13:05 - End Time 2025-03-02 04:13:05 [2025-03-02 04:13:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588605', 'tblTempUsageDetail_20' ) start [2025-03-02 04:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588605', 'tblTempUsageDetail_20' ) end [2025-03-02 04:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588605', 'tblTempVendorCDR_20' ) start [2025-03-02 04:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588605', 'tblTempVendorCDR_20' ) end [2025-03-02 04:13:17] Production.INFO: ProcessCDR(1,14588605,1,1,2) [2025-03-02 04:13:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588605,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:13:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588605,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:13:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588605,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:13:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588605,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:13:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588605', 'tblTempUsageDetail_20' ) start [2025-03-02 04:13:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588605', 'tblTempUsageDetail_20' ) end [2025-03-02 04:13:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:13:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:13:20] Production.INFO: ==603== Releasing lock... [2025-03-02 04:13:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:13:20] Production.INFO: 30.25 MB #Memory Used# [2025-03-02 04:14:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:14:05 [end_date_ymd] => 2025-03-02 04:14:05 [RateCDR] => 1 ) [2025-03-02 04: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-03-02 01:14:05' and `end` < '2025-03-02 04: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-03-02 04:14:17] Production.INFO: count ==351 [2025-03-02 04:14:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:14:05 - End Time 2025-03-02 04:14:05 [2025-03-02 04:14:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588610', 'tblTempUsageDetail_20' ) start [2025-03-02 04:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588610', 'tblTempUsageDetail_20' ) end [2025-03-02 04:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588610', 'tblTempVendorCDR_20' ) start [2025-03-02 04:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588610', 'tblTempVendorCDR_20' ) end [2025-03-02 04:14:17] Production.INFO: ProcessCDR(1,14588610,1,1,2) [2025-03-02 04:14:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588610,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:14:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588610,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:14:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588610,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:14:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588610,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:14:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588610', 'tblTempUsageDetail_20' ) start [2025-03-02 04:14:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588610', 'tblTempUsageDetail_20' ) end [2025-03-02 04:14:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:14:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:14:21] Production.INFO: ==713== Releasing lock... [2025-03-02 04:14:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:14:21] Production.INFO: 30.25 MB #Memory Used# [2025-03-02 04:15:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:15:05 [end_date_ymd] => 2025-03-02 04:15:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:15:05' and `end` < '2025-03-02 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-03-02 04:15:17] Production.INFO: count ==348 [2025-03-02 04:15:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:15:05 - End Time 2025-03-02 04:15:05 [2025-03-02 04:15:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588615', 'tblTempUsageDetail_20' ) start [2025-03-02 04:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588615', 'tblTempUsageDetail_20' ) end [2025-03-02 04:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588615', 'tblTempVendorCDR_20' ) start [2025-03-02 04:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588615', 'tblTempVendorCDR_20' ) end [2025-03-02 04:15:17] Production.INFO: ProcessCDR(1,14588615,1,1,2) [2025-03-02 04:15:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588615,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:15:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588615,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:15:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588615,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:15:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588615,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:15:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588615', 'tblTempUsageDetail_20' ) start [2025-03-02 04:15:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588615', 'tblTempUsageDetail_20' ) end [2025-03-02 04:15:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:15:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:15:20] Production.INFO: ==796== Releasing lock... [2025-03-02 04:15:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:15:20] Production.INFO: 30 MB #Memory Used# [2025-03-02 04:16:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:16:06 [end_date_ymd] => 2025-03-02 04:16:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:16:06' and `end` < '2025-03-02 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-03-02 04:16:18] Production.INFO: count ==344 [2025-03-02 04:16:18] Production.ERROR: pbx CDR StartTime 2025-03-02 01:16:06 - End Time 2025-03-02 04:16:06 [2025-03-02 04:16:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588620', 'tblTempUsageDetail_20' ) start [2025-03-02 04:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588620', 'tblTempUsageDetail_20' ) end [2025-03-02 04:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588620', 'tblTempVendorCDR_20' ) start [2025-03-02 04:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588620', 'tblTempVendorCDR_20' ) end [2025-03-02 04:16:18] Production.INFO: ProcessCDR(1,14588620,1,1,2) [2025-03-02 04:16:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588620,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:16:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588620,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:16:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588620,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:16:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588620,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588620', 'tblTempUsageDetail_20' ) start [2025-03-02 04:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588620', 'tblTempUsageDetail_20' ) end [2025-03-02 04:16:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:16:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:16:21] Production.INFO: ==872== Releasing lock... [2025-03-02 04:16:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:16:21] Production.INFO: 30 MB #Memory Used# [2025-03-02 04:17:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:17:06 [end_date_ymd] => 2025-03-02 04:17:06 [RateCDR] => 1 ) [2025-03-02 04: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-03-02 01:17:06' and `end` < '2025-03-02 04: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-03-02 04:17:18] Production.INFO: count ==342 [2025-03-02 04:17:18] Production.ERROR: pbx CDR StartTime 2025-03-02 01:17:06 - End Time 2025-03-02 04:17:06 [2025-03-02 04:17:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588625', 'tblTempUsageDetail_20' ) start [2025-03-02 04:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588625', 'tblTempUsageDetail_20' ) end [2025-03-02 04:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588625', 'tblTempVendorCDR_20' ) start [2025-03-02 04:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588625', 'tblTempVendorCDR_20' ) end [2025-03-02 04:17:18] Production.INFO: ProcessCDR(1,14588625,1,1,2) [2025-03-02 04:17:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588625,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:17:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588625,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:17:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588625,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:17:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588625,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588625', 'tblTempUsageDetail_20' ) start [2025-03-02 04:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588625', 'tblTempUsageDetail_20' ) end [2025-03-02 04:17:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:17:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:17:21] Production.INFO: ==1002== Releasing lock... [2025-03-02 04:17:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:17:21] Production.INFO: 30 MB #Memory Used# [2025-03-02 04:18:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:18:05 [end_date_ymd] => 2025-03-02 04:18:05 [RateCDR] => 1 ) [2025-03-02 04: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-03-02 01:18:05' and `end` < '2025-03-02 04: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-03-02 04:18:18] Production.INFO: count ==342 [2025-03-02 04:18:18] Production.ERROR: pbx CDR StartTime 2025-03-02 01:18:05 - End Time 2025-03-02 04:18:05 [2025-03-02 04:18:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588630', 'tblTempUsageDetail_20' ) start [2025-03-02 04:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588630', 'tblTempUsageDetail_20' ) end [2025-03-02 04:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588630', 'tblTempVendorCDR_20' ) start [2025-03-02 04:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588630', 'tblTempVendorCDR_20' ) end [2025-03-02 04:18:18] Production.INFO: ProcessCDR(1,14588630,1,1,2) [2025-03-02 04:18:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588630,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:18:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588630,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:18:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588630,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:18:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588630,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588630', 'tblTempUsageDetail_20' ) start [2025-03-02 04:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588630', 'tblTempUsageDetail_20' ) end [2025-03-02 04:18:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:18:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:18:21] Production.INFO: ==1087== Releasing lock... [2025-03-02 04:18:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:18:21] Production.INFO: 30 MB #Memory Used# [2025-03-02 04:19:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:19:05 [end_date_ymd] => 2025-03-02 04:19:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:19:05' and `end` < '2025-03-02 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-03-02 04:19:17] Production.INFO: count ==340 [2025-03-02 04:19:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:19:05 - End Time 2025-03-02 04:19:05 [2025-03-02 04:19:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588635', 'tblTempUsageDetail_20' ) start [2025-03-02 04:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588635', 'tblTempUsageDetail_20' ) end [2025-03-02 04:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588635', 'tblTempVendorCDR_20' ) start [2025-03-02 04:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588635', 'tblTempVendorCDR_20' ) end [2025-03-02 04:19:17] Production.INFO: ProcessCDR(1,14588635,1,1,2) [2025-03-02 04:19:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588635,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:19:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588635,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:19:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588635,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:19:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588635,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:19:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588635', 'tblTempUsageDetail_20' ) start [2025-03-02 04:19:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588635', 'tblTempUsageDetail_20' ) end [2025-03-02 04:19:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:19:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:19:20] Production.INFO: ==1169== Releasing lock... [2025-03-02 04:19:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:19:20] Production.INFO: 30 MB #Memory Used# [2025-03-02 04:20:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:20:06 [end_date_ymd] => 2025-03-02 04:20:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:20:06' and `end` < '2025-03-02 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-03-02 04:20:18] Production.INFO: count ==341 [2025-03-02 04:20:18] Production.ERROR: pbx CDR StartTime 2025-03-02 01:20:06 - End Time 2025-03-02 04:20:06 [2025-03-02 04:20:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588641', 'tblTempUsageDetail_20' ) start [2025-03-02 04:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588641', 'tblTempUsageDetail_20' ) end [2025-03-02 04:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588641', 'tblTempVendorCDR_20' ) start [2025-03-02 04:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588641', 'tblTempVendorCDR_20' ) end [2025-03-02 04:20:18] Production.INFO: ProcessCDR(1,14588641,1,1,2) [2025-03-02 04:20:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588641,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:20:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588641,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:20:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588641,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:20:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588641,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588641', 'tblTempUsageDetail_20' ) start [2025-03-02 04:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588641', 'tblTempUsageDetail_20' ) end [2025-03-02 04:20:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:20:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:20:22] Production.INFO: ==1269== Releasing lock... [2025-03-02 04:20:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:20:22] Production.INFO: 30 MB #Memory Used# [2025-03-02 04:21:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:21:05 [end_date_ymd] => 2025-03-02 04:21:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:21:05' and `end` < '2025-03-02 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-03-02 04:21:17] Production.INFO: count ==330 [2025-03-02 04:21:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:21:05 - End Time 2025-03-02 04:21:05 [2025-03-02 04:21:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588646', 'tblTempUsageDetail_20' ) start [2025-03-02 04:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588646', 'tblTempUsageDetail_20' ) end [2025-03-02 04:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588646', 'tblTempVendorCDR_20' ) start [2025-03-02 04:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588646', 'tblTempVendorCDR_20' ) end [2025-03-02 04:21:17] Production.INFO: ProcessCDR(1,14588646,1,1,2) [2025-03-02 04:21:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588646,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:21:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588646,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:21:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588646,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:21:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588646,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:21:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588646', 'tblTempUsageDetail_20' ) start [2025-03-02 04:21:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588646', 'tblTempUsageDetail_20' ) end [2025-03-02 04:21:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:21:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:21:22] Production.INFO: ==1351== Releasing lock... [2025-03-02 04:21:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:21:22] Production.INFO: 30 MB #Memory Used# [2025-03-02 04:22:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:22:06 [end_date_ymd] => 2025-03-02 04:22:06 [RateCDR] => 1 ) [2025-03-02 04: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-03-02 01:22:06' and `end` < '2025-03-02 04: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-03-02 04:22:18] Production.INFO: count ==328 [2025-03-02 04:22:18] Production.ERROR: pbx CDR StartTime 2025-03-02 01:22:06 - End Time 2025-03-02 04:22:06 [2025-03-02 04:22:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588651', 'tblTempUsageDetail_20' ) start [2025-03-02 04:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588651', 'tblTempUsageDetail_20' ) end [2025-03-02 04:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588651', 'tblTempVendorCDR_20' ) start [2025-03-02 04:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588651', 'tblTempVendorCDR_20' ) end [2025-03-02 04:22:18] Production.INFO: ProcessCDR(1,14588651,1,1,2) [2025-03-02 04:22:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588651,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:22:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588651,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:22:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588651,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:22:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588651,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588651', 'tblTempUsageDetail_20' ) start [2025-03-02 04:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588651', 'tblTempUsageDetail_20' ) end [2025-03-02 04:22:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:22:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:22:21] Production.INFO: ==1434== Releasing lock... [2025-03-02 04:22:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:22:21] Production.INFO: 30 MB #Memory Used# [2025-03-02 04:23:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:23:05 [end_date_ymd] => 2025-03-02 04:23:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:23:05' and `end` < '2025-03-02 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-03-02 04:23:17] Production.INFO: count ==327 [2025-03-02 04:23:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:23:05 - End Time 2025-03-02 04:23:05 [2025-03-02 04:23:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588656', 'tblTempUsageDetail_20' ) start [2025-03-02 04:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588656', 'tblTempUsageDetail_20' ) end [2025-03-02 04:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588656', 'tblTempVendorCDR_20' ) start [2025-03-02 04:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588656', 'tblTempVendorCDR_20' ) end [2025-03-02 04:23:17] Production.INFO: ProcessCDR(1,14588656,1,1,2) [2025-03-02 04:23:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588656,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:23:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588656,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:23:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588656,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:23:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588656,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:23:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588656', 'tblTempUsageDetail_20' ) start [2025-03-02 04:23:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588656', 'tblTempUsageDetail_20' ) end [2025-03-02 04:23:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:23:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:23:21] Production.INFO: ==1548== Releasing lock... [2025-03-02 04:23:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:23:21] Production.INFO: 30 MB #Memory Used# [2025-03-02 04:24:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:24:05 [end_date_ymd] => 2025-03-02 04:24:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:24:05' and `end` < '2025-03-02 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-03-02 04:24:17] Production.INFO: count ==327 [2025-03-02 04:24:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:24:05 - End Time 2025-03-02 04:24:05 [2025-03-02 04:24:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588661', 'tblTempUsageDetail_20' ) start [2025-03-02 04:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588661', 'tblTempUsageDetail_20' ) end [2025-03-02 04:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588661', 'tblTempVendorCDR_20' ) start [2025-03-02 04:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588661', 'tblTempVendorCDR_20' ) end [2025-03-02 04:24:17] Production.INFO: ProcessCDR(1,14588661,1,1,2) [2025-03-02 04:24:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588661,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:24:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588661,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:24:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588661,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:24:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588661,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588661', 'tblTempUsageDetail_20' ) start [2025-03-02 04:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588661', 'tblTempUsageDetail_20' ) end [2025-03-02 04:24:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:24:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:24:21] Production.INFO: ==1641== Releasing lock... [2025-03-02 04:24:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:24:21] Production.INFO: 30 MB #Memory Used# [2025-03-02 04:25:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:25:05 [end_date_ymd] => 2025-03-02 04:25:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:25:05' and `end` < '2025-03-02 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-03-02 04:25:17] Production.INFO: count ==327 [2025-03-02 04:25:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:25:05 - End Time 2025-03-02 04:25:05 [2025-03-02 04:25:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588666', 'tblTempUsageDetail_20' ) start [2025-03-02 04:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588666', 'tblTempUsageDetail_20' ) end [2025-03-02 04:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588666', 'tblTempVendorCDR_20' ) start [2025-03-02 04:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588666', 'tblTempVendorCDR_20' ) end [2025-03-02 04:25:17] Production.INFO: ProcessCDR(1,14588666,1,1,2) [2025-03-02 04:25:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588666,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:25:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588666,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:25:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588666,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:25:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588666,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:25:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588666', 'tblTempUsageDetail_20' ) start [2025-03-02 04:25:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588666', 'tblTempUsageDetail_20' ) end [2025-03-02 04:25:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:25:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:25:20] Production.INFO: ==1722== Releasing lock... [2025-03-02 04:25:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:25:20] Production.INFO: 30 MB #Memory Used# [2025-03-02 04:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:26:05 [end_date_ymd] => 2025-03-02 04:26:05 [RateCDR] => 1 ) [2025-03-02 04: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-03-02 01:26:05' and `end` < '2025-03-02 04: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-03-02 04:26:17] Production.INFO: count ==327 [2025-03-02 04:26:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:26:05 - End Time 2025-03-02 04:26:05 [2025-03-02 04:26:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588671', 'tblTempUsageDetail_20' ) start [2025-03-02 04:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588671', 'tblTempUsageDetail_20' ) end [2025-03-02 04:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588671', 'tblTempVendorCDR_20' ) start [2025-03-02 04:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588671', 'tblTempVendorCDR_20' ) end [2025-03-02 04:26:17] Production.INFO: ProcessCDR(1,14588671,1,1,2) [2025-03-02 04:26:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588671,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:26:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588671,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:26:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588671,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:26:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588671,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:26:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588671', 'tblTempUsageDetail_20' ) start [2025-03-02 04:26:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588671', 'tblTempUsageDetail_20' ) end [2025-03-02 04:26:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:26:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:26:20] Production.INFO: ==1805== Releasing lock... [2025-03-02 04:26:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:26:20] Production.INFO: 30 MB #Memory Used# [2025-03-02 04:27:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:27:05 [end_date_ymd] => 2025-03-02 04:27:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:27:05' and `end` < '2025-03-02 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-03-02 04:27:17] Production.INFO: count ==327 [2025-03-02 04:27:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:27:05 - End Time 2025-03-02 04:27:05 [2025-03-02 04:27:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588676', 'tblTempUsageDetail_20' ) start [2025-03-02 04:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588676', 'tblTempUsageDetail_20' ) end [2025-03-02 04:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588676', 'tblTempVendorCDR_20' ) start [2025-03-02 04:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588676', 'tblTempVendorCDR_20' ) end [2025-03-02 04:27:17] Production.INFO: ProcessCDR(1,14588676,1,1,2) [2025-03-02 04:27:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588676,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:27:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588676,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:27:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588676,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:27:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588676,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:27:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588676', 'tblTempUsageDetail_20' ) start [2025-03-02 04:27:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588676', 'tblTempUsageDetail_20' ) end [2025-03-02 04:27:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:27:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:27:20] Production.INFO: ==1899== Releasing lock... [2025-03-02 04:27:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:27:20] Production.INFO: 30 MB #Memory Used# [2025-03-02 04:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:28:05 [end_date_ymd] => 2025-03-02 04:28:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:28:05' and `end` < '2025-03-02 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-03-02 04:28:17] Production.INFO: count ==327 [2025-03-02 04:28:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:28:05 - End Time 2025-03-02 04:28:05 [2025-03-02 04:28:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588681', 'tblTempUsageDetail_20' ) start [2025-03-02 04:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588681', 'tblTempUsageDetail_20' ) end [2025-03-02 04:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588681', 'tblTempVendorCDR_20' ) start [2025-03-02 04:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588681', 'tblTempVendorCDR_20' ) end [2025-03-02 04:28:17] Production.INFO: ProcessCDR(1,14588681,1,1,2) [2025-03-02 04:28:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588681,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:28:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588681,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:28:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588681,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:28:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588681,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:28:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588681', 'tblTempUsageDetail_20' ) start [2025-03-02 04:28:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588681', 'tblTempUsageDetail_20' ) end [2025-03-02 04:28:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:28:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:28:20] Production.INFO: ==1984== Releasing lock... [2025-03-02 04:28:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:28:20] Production.INFO: 30 MB #Memory Used# [2025-03-02 04:29:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:29:05 [end_date_ymd] => 2025-03-02 04:29:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:29:05' and `end` < '2025-03-02 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-03-02 04:29:17] Production.INFO: count ==323 [2025-03-02 04:29:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:29:05 - End Time 2025-03-02 04:29:05 [2025-03-02 04:29:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588686', 'tblTempUsageDetail_20' ) start [2025-03-02 04:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588686', 'tblTempUsageDetail_20' ) end [2025-03-02 04:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588686', 'tblTempVendorCDR_20' ) start [2025-03-02 04:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588686', 'tblTempVendorCDR_20' ) end [2025-03-02 04:29:17] Production.INFO: ProcessCDR(1,14588686,1,1,2) [2025-03-02 04:29:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588686,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:29:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588686,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:29:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588686,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:29:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588686,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:29:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588686', 'tblTempUsageDetail_20' ) start [2025-03-02 04:29:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588686', 'tblTempUsageDetail_20' ) end [2025-03-02 04:29:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:29:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:29:20] Production.INFO: ==2065== Releasing lock... [2025-03-02 04:29:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:29:20] Production.INFO: 30 MB #Memory Used# [2025-03-02 04:30:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:30:06 [end_date_ymd] => 2025-03-02 04:30:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:30:06' and `end` < '2025-03-02 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-03-02 04:30:18] Production.INFO: count ==316 [2025-03-02 04:30:18] Production.ERROR: pbx CDR StartTime 2025-03-02 01:30:06 - End Time 2025-03-02 04:30:06 [2025-03-02 04:30:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588692', 'tblTempUsageDetail_20' ) start [2025-03-02 04:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588692', 'tblTempUsageDetail_20' ) end [2025-03-02 04:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588692', 'tblTempVendorCDR_20' ) start [2025-03-02 04:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588692', 'tblTempVendorCDR_20' ) end [2025-03-02 04:30:18] Production.INFO: ProcessCDR(1,14588692,1,1,2) [2025-03-02 04:30:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588692,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:30:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588692,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:30:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588692,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:30:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588692,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:30:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588692', 'tblTempUsageDetail_20' ) start [2025-03-02 04:30:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588692', 'tblTempUsageDetail_20' ) end [2025-03-02 04:30:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:30:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:30:23] Production.INFO: ==2149== Releasing lock... [2025-03-02 04:30:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:30:23] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 04:31:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:31:06 [end_date_ymd] => 2025-03-02 04:31:06 [RateCDR] => 1 ) [2025-03-02 04: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-03-02 01:31:06' and `end` < '2025-03-02 04: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-03-02 04:31:18] Production.INFO: count ==298 [2025-03-02 04:31:18] Production.ERROR: pbx CDR StartTime 2025-03-02 01:31:06 - End Time 2025-03-02 04:31:06 [2025-03-02 04:31:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588698', 'tblTempUsageDetail_20' ) start [2025-03-02 04:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588698', 'tblTempUsageDetail_20' ) end [2025-03-02 04:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588698', 'tblTempVendorCDR_20' ) start [2025-03-02 04:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588698', 'tblTempVendorCDR_20' ) end [2025-03-02 04:31:18] Production.INFO: ProcessCDR(1,14588698,1,1,2) [2025-03-02 04:31:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588698,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:31:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588698,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:31:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588698,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:31:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588698,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:31:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588698', 'tblTempUsageDetail_20' ) start [2025-03-02 04:31:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588698', 'tblTempUsageDetail_20' ) end [2025-03-02 04:31:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:31:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:31:23] Production.INFO: ==2238== Releasing lock... [2025-03-02 04:31:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:31:23] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 04:32:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:32:06 [end_date_ymd] => 2025-03-02 04:32:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:32:06' and `end` < '2025-03-02 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-03-02 04:32:18] Production.INFO: count ==298 [2025-03-02 04:32:18] Production.ERROR: pbx CDR StartTime 2025-03-02 01:32:06 - End Time 2025-03-02 04:32:06 [2025-03-02 04:32:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:32:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588703', 'tblTempUsageDetail_20' ) start [2025-03-02 04:32:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588703', 'tblTempUsageDetail_20' ) end [2025-03-02 04:32:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588703', 'tblTempVendorCDR_20' ) start [2025-03-02 04:32:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588703', 'tblTempVendorCDR_20' ) end [2025-03-02 04:32:18] Production.INFO: ProcessCDR(1,14588703,1,1,2) [2025-03-02 04:32:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588703,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:32:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588703,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:32:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588703,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:32:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588703,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:32:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588703', 'tblTempUsageDetail_20' ) start [2025-03-02 04:32:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588703', 'tblTempUsageDetail_20' ) end [2025-03-02 04:32:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:32:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:32:21] Production.INFO: ==2425== Releasing lock... [2025-03-02 04:32:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:32:21] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 04:33:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:33:06 [end_date_ymd] => 2025-03-02 04:33:06 [RateCDR] => 1 ) [2025-03-02 04: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-03-02 01:33:06' and `end` < '2025-03-02 04: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-03-02 04:33:18] Production.INFO: count ==298 [2025-03-02 04:33:18] Production.ERROR: pbx CDR StartTime 2025-03-02 01:33:06 - End Time 2025-03-02 04:33:06 [2025-03-02 04:33:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588708', 'tblTempUsageDetail_20' ) start [2025-03-02 04:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588708', 'tblTempUsageDetail_20' ) end [2025-03-02 04:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588708', 'tblTempVendorCDR_20' ) start [2025-03-02 04:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588708', 'tblTempVendorCDR_20' ) end [2025-03-02 04:33:18] Production.INFO: ProcessCDR(1,14588708,1,1,2) [2025-03-02 04:33:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588708,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:33:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588708,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:33:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588708,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:33:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588708,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:33:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588708', 'tblTempUsageDetail_20' ) start [2025-03-02 04:33:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588708', 'tblTempUsageDetail_20' ) end [2025-03-02 04:33:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:33:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:33:21] Production.INFO: ==2511== Releasing lock... [2025-03-02 04:33:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:33:21] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 04:34:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:34:05 [end_date_ymd] => 2025-03-02 04:34:05 [RateCDR] => 1 ) [2025-03-02 04: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-03-02 01:34:05' and `end` < '2025-03-02 04: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-03-02 04:34:17] Production.INFO: count ==296 [2025-03-02 04:34:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:34:05 - End Time 2025-03-02 04:34:05 [2025-03-02 04:34:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588713', 'tblTempUsageDetail_20' ) start [2025-03-02 04:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588713', 'tblTempUsageDetail_20' ) end [2025-03-02 04:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588713', 'tblTempVendorCDR_20' ) start [2025-03-02 04:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588713', 'tblTempVendorCDR_20' ) end [2025-03-02 04:34:17] Production.INFO: ProcessCDR(1,14588713,1,1,2) [2025-03-02 04:34:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588713,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:34:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588713,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:34:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588713,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:34:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588713,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:34:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588713', 'tblTempUsageDetail_20' ) start [2025-03-02 04:34:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588713', 'tblTempUsageDetail_20' ) end [2025-03-02 04:34:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:34:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:34:20] Production.INFO: ==2592== Releasing lock... [2025-03-02 04:34:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:34:20] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 04:35:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:35:06 [end_date_ymd] => 2025-03-02 04:35:06 [RateCDR] => 1 ) [2025-03-02 04: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-03-02 01:35:06' and `end` < '2025-03-02 04: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-03-02 04:35:18] Production.INFO: count ==296 [2025-03-02 04:35:18] Production.ERROR: pbx CDR StartTime 2025-03-02 01:35:06 - End Time 2025-03-02 04:35:06 [2025-03-02 04:35:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588718', 'tblTempUsageDetail_20' ) start [2025-03-02 04:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588718', 'tblTempUsageDetail_20' ) end [2025-03-02 04:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588718', 'tblTempVendorCDR_20' ) start [2025-03-02 04:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588718', 'tblTempVendorCDR_20' ) end [2025-03-02 04:35:18] Production.INFO: ProcessCDR(1,14588718,1,1,2) [2025-03-02 04:35:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588718,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:35:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588718,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:35:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588718,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:35:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588718,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:35:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588718', 'tblTempUsageDetail_20' ) start [2025-03-02 04:35:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588718', 'tblTempUsageDetail_20' ) end [2025-03-02 04:35:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:35:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:35:21] Production.INFO: ==2676== Releasing lock... [2025-03-02 04:35:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:35:21] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 04:36:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:36:05 [end_date_ymd] => 2025-03-02 04:36:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:36:05' and `end` < '2025-03-02 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-03-02 04:36:17] Production.INFO: count ==295 [2025-03-02 04:36:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:36:05 - End Time 2025-03-02 04:36:05 [2025-03-02 04:36:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588723', 'tblTempUsageDetail_20' ) start [2025-03-02 04:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588723', 'tblTempUsageDetail_20' ) end [2025-03-02 04:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588723', 'tblTempVendorCDR_20' ) start [2025-03-02 04:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588723', 'tblTempVendorCDR_20' ) end [2025-03-02 04:36:17] Production.INFO: ProcessCDR(1,14588723,1,1,2) [2025-03-02 04:36:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588723,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:36:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588723,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:36:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588723,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:36:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588723,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:36:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588723', 'tblTempUsageDetail_20' ) start [2025-03-02 04:36:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588723', 'tblTempUsageDetail_20' ) end [2025-03-02 04:36:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:36:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:36:20] Production.INFO: ==2772== Releasing lock... [2025-03-02 04:36:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:36:20] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 04:37:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:37:05 [end_date_ymd] => 2025-03-02 04:37:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:37:05' and `end` < '2025-03-02 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-03-02 04:37:17] Production.INFO: count ==295 [2025-03-02 04:37:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:37:05 - End Time 2025-03-02 04:37:05 [2025-03-02 04:37:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588728', 'tblTempUsageDetail_20' ) start [2025-03-02 04:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588728', 'tblTempUsageDetail_20' ) end [2025-03-02 04:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588728', 'tblTempVendorCDR_20' ) start [2025-03-02 04:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588728', 'tblTempVendorCDR_20' ) end [2025-03-02 04:37:17] Production.INFO: ProcessCDR(1,14588728,1,1,2) [2025-03-02 04:37:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588728,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:37:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588728,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:37:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588728,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:37:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588728,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588728', 'tblTempUsageDetail_20' ) start [2025-03-02 04:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588728', 'tblTempUsageDetail_20' ) end [2025-03-02 04:37:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:37:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:37:21] Production.INFO: ==2878== Releasing lock... [2025-03-02 04:37:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:37:21] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 04:38:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:38:05 [end_date_ymd] => 2025-03-02 04:38:05 [RateCDR] => 1 ) [2025-03-02 04: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-03-02 01:38:05' and `end` < '2025-03-02 04: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-03-02 04:38:17] Production.INFO: count ==297 [2025-03-02 04:38:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:38:05 - End Time 2025-03-02 04:38:05 [2025-03-02 04:38:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588733', 'tblTempUsageDetail_20' ) start [2025-03-02 04:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588733', 'tblTempUsageDetail_20' ) end [2025-03-02 04:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588733', 'tblTempVendorCDR_20' ) start [2025-03-02 04:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588733', 'tblTempVendorCDR_20' ) end [2025-03-02 04:38:17] Production.INFO: ProcessCDR(1,14588733,1,1,2) [2025-03-02 04:38:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588733,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:38:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588733,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:38:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588733,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:38:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588733,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588733', 'tblTempUsageDetail_20' ) start [2025-03-02 04:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588733', 'tblTempUsageDetail_20' ) end [2025-03-02 04:38:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:38:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:38:21] Production.INFO: ==2981== Releasing lock... [2025-03-02 04:38:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:38:21] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 04:39:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:39:05 [end_date_ymd] => 2025-03-02 04:39:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:39:05' and `end` < '2025-03-02 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-03-02 04:39:17] Production.INFO: count ==297 [2025-03-02 04:39:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:39:05 - End Time 2025-03-02 04:39:05 [2025-03-02 04:39:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588738', 'tblTempUsageDetail_20' ) start [2025-03-02 04:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588738', 'tblTempUsageDetail_20' ) end [2025-03-02 04:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588738', 'tblTempVendorCDR_20' ) start [2025-03-02 04:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588738', 'tblTempVendorCDR_20' ) end [2025-03-02 04:39:17] Production.INFO: ProcessCDR(1,14588738,1,1,2) [2025-03-02 04:39:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588738,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:39:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588738,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:39:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588738,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:39:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588738,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:39:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588738', 'tblTempUsageDetail_20' ) start [2025-03-02 04:39:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588738', 'tblTempUsageDetail_20' ) end [2025-03-02 04:39:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:39:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:39:20] Production.INFO: ==3088== Releasing lock... [2025-03-02 04:39:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:39:20] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 04:40:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:40:06 [end_date_ymd] => 2025-03-02 04:40:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:40:06' and `end` < '2025-03-02 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-03-02 04:40:17] Production.INFO: count ==294 [2025-03-02 04:40:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:40:06 - End Time 2025-03-02 04:40:06 [2025-03-02 04:40:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588744', 'tblTempUsageDetail_20' ) start [2025-03-02 04:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588744', 'tblTempUsageDetail_20' ) end [2025-03-02 04:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588744', 'tblTempVendorCDR_20' ) start [2025-03-02 04:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588744', 'tblTempVendorCDR_20' ) end [2025-03-02 04:40:18] Production.INFO: ProcessCDR(1,14588744,1,1,2) [2025-03-02 04:40:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588744,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:40:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588744,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:40:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588744,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:40:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588744,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:40:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588744', 'tblTempUsageDetail_20' ) start [2025-03-02 04:40:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588744', 'tblTempUsageDetail_20' ) end [2025-03-02 04:40:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:40:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:40:21] Production.INFO: ==3194== Releasing lock... [2025-03-02 04:40:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:40:21] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 04:41:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:41:05 [end_date_ymd] => 2025-03-02 04:41:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:41:05' and `end` < '2025-03-02 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-03-02 04:41:17] Production.INFO: count ==284 [2025-03-02 04:41:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:41:05 - End Time 2025-03-02 04:41:05 [2025-03-02 04:41:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588749', 'tblTempUsageDetail_20' ) start [2025-03-02 04:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588749', 'tblTempUsageDetail_20' ) end [2025-03-02 04:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588749', 'tblTempVendorCDR_20' ) start [2025-03-02 04:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588749', 'tblTempVendorCDR_20' ) end [2025-03-02 04:41:17] Production.INFO: ProcessCDR(1,14588749,1,1,2) [2025-03-02 04:41:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588749,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:41:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588749,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:41:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588749,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:41:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588749,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:41:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588749', 'tblTempUsageDetail_20' ) start [2025-03-02 04:41:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588749', 'tblTempUsageDetail_20' ) end [2025-03-02 04:41:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:41:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:41:20] Production.INFO: ==3301== Releasing lock... [2025-03-02 04:41:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:41:20] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 04:42:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:42:05 [end_date_ymd] => 2025-03-02 04:42:05 [RateCDR] => 1 ) [2025-03-02 04: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-03-02 01:42:05' and `end` < '2025-03-02 04: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-03-02 04:42:17] Production.INFO: count ==281 [2025-03-02 04:42:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:42:05 - End Time 2025-03-02 04:42:05 [2025-03-02 04:42:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588754', 'tblTempUsageDetail_20' ) start [2025-03-02 04:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588754', 'tblTempUsageDetail_20' ) end [2025-03-02 04:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588754', 'tblTempVendorCDR_20' ) start [2025-03-02 04:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588754', 'tblTempVendorCDR_20' ) end [2025-03-02 04:42:17] Production.INFO: ProcessCDR(1,14588754,1,1,2) [2025-03-02 04:42:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588754,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:42:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588754,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:42:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588754,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:42:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588754,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:42:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588754', 'tblTempUsageDetail_20' ) start [2025-03-02 04:42:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588754', 'tblTempUsageDetail_20' ) end [2025-03-02 04:42:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:42:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:42:20] Production.INFO: ==3404== Releasing lock... [2025-03-02 04:42:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:42:20] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 04:43:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:43:05 [end_date_ymd] => 2025-03-02 04:43:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:43:05' and `end` < '2025-03-02 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-03-02 04:43:17] Production.INFO: count ==281 [2025-03-02 04:43:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:43:05 - End Time 2025-03-02 04:43:05 [2025-03-02 04:43:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588759', 'tblTempUsageDetail_20' ) start [2025-03-02 04:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588759', 'tblTempUsageDetail_20' ) end [2025-03-02 04:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588759', 'tblTempVendorCDR_20' ) start [2025-03-02 04:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588759', 'tblTempVendorCDR_20' ) end [2025-03-02 04:43:17] Production.INFO: ProcessCDR(1,14588759,1,1,2) [2025-03-02 04:43:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588759,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:43:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588759,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:43:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588759,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:43:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588759,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:43:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588759', 'tblTempUsageDetail_20' ) start [2025-03-02 04:43:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588759', 'tblTempUsageDetail_20' ) end [2025-03-02 04:43:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:43:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:43:20] Production.INFO: ==3511== Releasing lock... [2025-03-02 04:43:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:43:20] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 04:44:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:44:05 [end_date_ymd] => 2025-03-02 04:44:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:44:05' and `end` < '2025-03-02 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-03-02 04:44:17] Production.INFO: count ==281 [2025-03-02 04:44:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:44:05 - End Time 2025-03-02 04:44:05 [2025-03-02 04:44:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588764', 'tblTempUsageDetail_20' ) start [2025-03-02 04:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588764', 'tblTempUsageDetail_20' ) end [2025-03-02 04:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588764', 'tblTempVendorCDR_20' ) start [2025-03-02 04:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588764', 'tblTempVendorCDR_20' ) end [2025-03-02 04:44:17] Production.INFO: ProcessCDR(1,14588764,1,1,2) [2025-03-02 04:44:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588764,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:44:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588764,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:44:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588764,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:44:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588764,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588764', 'tblTempUsageDetail_20' ) start [2025-03-02 04:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588764', 'tblTempUsageDetail_20' ) end [2025-03-02 04:44:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:44:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:44:21] Production.INFO: ==3622== Releasing lock... [2025-03-02 04:44:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:44:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 04:45:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:45:05 [end_date_ymd] => 2025-03-02 04:45:05 [RateCDR] => 1 ) [2025-03-02 04: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-03-02 01:45:05' and `end` < '2025-03-02 04: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-03-02 04:45:17] Production.INFO: count ==281 [2025-03-02 04:45:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:45:05 - End Time 2025-03-02 04:45:05 [2025-03-02 04:45:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588769', 'tblTempUsageDetail_20' ) start [2025-03-02 04:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588769', 'tblTempUsageDetail_20' ) end [2025-03-02 04:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588769', 'tblTempVendorCDR_20' ) start [2025-03-02 04:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588769', 'tblTempVendorCDR_20' ) end [2025-03-02 04:45:17] Production.INFO: ProcessCDR(1,14588769,1,1,2) [2025-03-02 04:45:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588769,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:45:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588769,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:45:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588769,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:45:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588769,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:45:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588769', 'tblTempUsageDetail_20' ) start [2025-03-02 04:45:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588769', 'tblTempUsageDetail_20' ) end [2025-03-02 04:45:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:45:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:45:20] Production.INFO: ==3726== Releasing lock... [2025-03-02 04:45:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:45:20] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 04:46:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:46:06 [end_date_ymd] => 2025-03-02 04:46:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:46:06' and `end` < '2025-03-02 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-03-02 04:46:18] Production.INFO: count ==281 [2025-03-02 04:46:18] Production.ERROR: pbx CDR StartTime 2025-03-02 01:46:06 - End Time 2025-03-02 04:46:06 [2025-03-02 04:46:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588774', 'tblTempUsageDetail_20' ) start [2025-03-02 04:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588774', 'tblTempUsageDetail_20' ) end [2025-03-02 04:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588774', 'tblTempVendorCDR_20' ) start [2025-03-02 04:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588774', 'tblTempVendorCDR_20' ) end [2025-03-02 04:46:18] Production.INFO: ProcessCDR(1,14588774,1,1,2) [2025-03-02 04:46:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588774,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:46:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588774,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:46:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588774,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:46:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588774,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588774', 'tblTempUsageDetail_20' ) start [2025-03-02 04:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588774', 'tblTempUsageDetail_20' ) end [2025-03-02 04:46:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:46:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:46:21] Production.INFO: ==3825== Releasing lock... [2025-03-02 04:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:46:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 04:47:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:47:05 [end_date_ymd] => 2025-03-02 04:47:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:47:05' and `end` < '2025-03-02 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-03-02 04:47:18] Production.INFO: count ==280 [2025-03-02 04:47:18] Production.ERROR: pbx CDR StartTime 2025-03-02 01:47:05 - End Time 2025-03-02 04:47:05 [2025-03-02 04:47:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588779', 'tblTempUsageDetail_20' ) start [2025-03-02 04:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588779', 'tblTempUsageDetail_20' ) end [2025-03-02 04:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588779', 'tblTempVendorCDR_20' ) start [2025-03-02 04:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588779', 'tblTempVendorCDR_20' ) end [2025-03-02 04:47:18] Production.INFO: ProcessCDR(1,14588779,1,1,2) [2025-03-02 04:47:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588779,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:47:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588779,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:47:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588779,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:47:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588779,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:47:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588779', 'tblTempUsageDetail_20' ) start [2025-03-02 04:47:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588779', 'tblTempUsageDetail_20' ) end [2025-03-02 04:47:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:47:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:47:21] Production.INFO: ==3981== Releasing lock... [2025-03-02 04:47:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:47:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 04:48:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:48:05 [end_date_ymd] => 2025-03-02 04:48:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:48:05' and `end` < '2025-03-02 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-03-02 04:48:17] Production.INFO: count ==280 [2025-03-02 04:48:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:48:05 - End Time 2025-03-02 04:48:05 [2025-03-02 04:48:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588784', 'tblTempUsageDetail_20' ) start [2025-03-02 04:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588784', 'tblTempUsageDetail_20' ) end [2025-03-02 04:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588784', 'tblTempVendorCDR_20' ) start [2025-03-02 04:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588784', 'tblTempVendorCDR_20' ) end [2025-03-02 04:48:18] Production.INFO: ProcessCDR(1,14588784,1,1,2) [2025-03-02 04:48:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588784,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:48:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588784,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:48:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588784,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:48:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588784,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:48:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588784', 'tblTempUsageDetail_20' ) start [2025-03-02 04:48:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588784', 'tblTempUsageDetail_20' ) end [2025-03-02 04:48:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:48:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:48:21] Production.INFO: ==4094== Releasing lock... [2025-03-02 04:48:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:48:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 04:49:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:49:05 [end_date_ymd] => 2025-03-02 04:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:49:05' and `end` < '2025-03-02 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-03-02 04:49:19] Production.INFO: count ==280 [2025-03-02 04:49:19] Production.ERROR: pbx CDR StartTime 2025-03-02 01:49:05 - End Time 2025-03-02 04:49:05 [2025-03-02 04:49:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:49:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588789', 'tblTempUsageDetail_20' ) start [2025-03-02 04:49:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588789', 'tblTempUsageDetail_20' ) end [2025-03-02 04:49:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588789', 'tblTempVendorCDR_20' ) start [2025-03-02 04:49:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588789', 'tblTempVendorCDR_20' ) end [2025-03-02 04:49:19] Production.INFO: ProcessCDR(1,14588789,1,1,2) [2025-03-02 04:49:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588789,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:49:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588789,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:49:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588789,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:49:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588789,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:49:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588789', 'tblTempUsageDetail_20' ) start [2025-03-02 04:49:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588789', 'tblTempUsageDetail_20' ) end [2025-03-02 04:49:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:49:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:49:22] Production.INFO: ==4199== Releasing lock... [2025-03-02 04:49:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:49:22] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 04:50:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:50:06 [end_date_ymd] => 2025-03-02 04:50:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:50:06' and `end` < '2025-03-02 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-03-02 04:50:19] Production.INFO: count ==276 [2025-03-02 04:50:19] Production.ERROR: pbx CDR StartTime 2025-03-02 01:50:06 - End Time 2025-03-02 04:50:06 [2025-03-02 04:50:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588795', 'tblTempUsageDetail_20' ) start [2025-03-02 04:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588795', 'tblTempUsageDetail_20' ) end [2025-03-02 04:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588795', 'tblTempVendorCDR_20' ) start [2025-03-02 04:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588795', 'tblTempVendorCDR_20' ) end [2025-03-02 04:50:19] Production.INFO: ProcessCDR(1,14588795,1,1,2) [2025-03-02 04:50:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588795,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:50:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588795,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:50:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588795,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:50:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588795,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:50:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588795', 'tblTempUsageDetail_20' ) start [2025-03-02 04:50:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588795', 'tblTempUsageDetail_20' ) end [2025-03-02 04:50:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:50:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:50:22] Production.INFO: ==4307== Releasing lock... [2025-03-02 04:50:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:50:22] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 04:51:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:51:05 [end_date_ymd] => 2025-03-02 04:51:05 [RateCDR] => 1 ) [2025-03-02 04: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-03-02 01:51:05' and `end` < '2025-03-02 04: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-03-02 04:51:17] Production.INFO: count ==263 [2025-03-02 04:51:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:51:05 - End Time 2025-03-02 04:51:05 [2025-03-02 04:51:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588800', 'tblTempUsageDetail_20' ) start [2025-03-02 04:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588800', 'tblTempUsageDetail_20' ) end [2025-03-02 04:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588800', 'tblTempVendorCDR_20' ) start [2025-03-02 04:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588800', 'tblTempVendorCDR_20' ) end [2025-03-02 04:51:17] Production.INFO: ProcessCDR(1,14588800,1,1,2) [2025-03-02 04:51:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588800,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:51:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588800,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:51:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588800,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:51:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588800,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:51:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588800', 'tblTempUsageDetail_20' ) start [2025-03-02 04:51:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588800', 'tblTempUsageDetail_20' ) end [2025-03-02 04:51:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:51:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:51:20] Production.INFO: ==4414== Releasing lock... [2025-03-02 04:51:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:51:20] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 04:52:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:52:05 [end_date_ymd] => 2025-03-02 04:52:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:52:05' and `end` < '2025-03-02 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-03-02 04:52:17] Production.INFO: count ==263 [2025-03-02 04:52:18] Production.ERROR: pbx CDR StartTime 2025-03-02 01:52:05 - End Time 2025-03-02 04:52:05 [2025-03-02 04:52:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588805', 'tblTempUsageDetail_20' ) start [2025-03-02 04:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588805', 'tblTempUsageDetail_20' ) end [2025-03-02 04:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588805', 'tblTempVendorCDR_20' ) start [2025-03-02 04:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588805', 'tblTempVendorCDR_20' ) end [2025-03-02 04:52:18] Production.INFO: ProcessCDR(1,14588805,1,1,2) [2025-03-02 04:52:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588805,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:52:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588805,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:52:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588805,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:52:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588805,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:52:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588805', 'tblTempUsageDetail_20' ) start [2025-03-02 04:52:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588805', 'tblTempUsageDetail_20' ) end [2025-03-02 04:52:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:52:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:52:21] Production.INFO: ==4522== Releasing lock... [2025-03-02 04:52:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:52:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 04:53:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:53:04 [end_date_ymd] => 2025-03-02 04:53:04 [RateCDR] => 1 ) [2025-03-02 04: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-03-02 01:53:04' and `end` < '2025-03-02 04: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-03-02 04:53:16] Production.INFO: count ==260 [2025-03-02 04:53:16] Production.ERROR: pbx CDR StartTime 2025-03-02 01:53:04 - End Time 2025-03-02 04:53:04 [2025-03-02 04:53:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588810', 'tblTempUsageDetail_20' ) start [2025-03-02 04:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588810', 'tblTempUsageDetail_20' ) end [2025-03-02 04:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588810', 'tblTempVendorCDR_20' ) start [2025-03-02 04:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588810', 'tblTempVendorCDR_20' ) end [2025-03-02 04:53:16] Production.INFO: ProcessCDR(1,14588810,1,1,2) [2025-03-02 04:53:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588810,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:53:17] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588810,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:53:17] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588810,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:53:19] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588810,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:53:19] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588810', 'tblTempUsageDetail_20' ) start [2025-03-02 04:53:19] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588810', 'tblTempUsageDetail_20' ) end [2025-03-02 04:53:19] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:53:19] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:53:19] Production.INFO: ==4628== Releasing lock... [2025-03-02 04:53:19] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:53:19] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 04:54:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:54:05 [end_date_ymd] => 2025-03-02 04:54:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:54:05' and `end` < '2025-03-02 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-03-02 04:54:17] Production.INFO: count ==260 [2025-03-02 04:54:17] Production.ERROR: pbx CDR StartTime 2025-03-02 01:54:05 - End Time 2025-03-02 04:54:05 [2025-03-02 04:54:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588815', 'tblTempUsageDetail_20' ) start [2025-03-02 04:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588815', 'tblTempUsageDetail_20' ) end [2025-03-02 04:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588815', 'tblTempVendorCDR_20' ) start [2025-03-02 04:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588815', 'tblTempVendorCDR_20' ) end [2025-03-02 04:54:17] Production.INFO: ProcessCDR(1,14588815,1,1,2) [2025-03-02 04:54:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588815,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:54:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588815,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:54:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588815,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:54:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588815,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:54:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588815', 'tblTempUsageDetail_20' ) start [2025-03-02 04:54:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588815', 'tblTempUsageDetail_20' ) end [2025-03-02 04:54:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:54:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:54:20] Production.INFO: ==4726== Releasing lock... [2025-03-02 04:54:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:54:20] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 04:55:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:55:05 [end_date_ymd] => 2025-03-02 04:55:05 [RateCDR] => 1 ) [2025-03-02 04: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-03-02 01:55:05' and `end` < '2025-03-02 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-03-02 04:55:18] Production.INFO: count ==259 [2025-03-02 04:55:18] Production.ERROR: pbx CDR StartTime 2025-03-02 01:55:05 - End Time 2025-03-02 04:55:05 [2025-03-02 04:55:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588820', 'tblTempUsageDetail_20' ) start [2025-03-02 04:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588820', 'tblTempUsageDetail_20' ) end [2025-03-02 04:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588820', 'tblTempVendorCDR_20' ) start [2025-03-02 04:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588820', 'tblTempVendorCDR_20' ) end [2025-03-02 04:55:18] Production.INFO: ProcessCDR(1,14588820,1,1,2) [2025-03-02 04:55:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588820,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:55:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588820,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:55:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588820,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:55:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588820,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588820', 'tblTempUsageDetail_20' ) start [2025-03-02 04:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588820', 'tblTempUsageDetail_20' ) end [2025-03-02 04:55:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:55:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:55:21] Production.INFO: ==4843== Releasing lock... [2025-03-02 04:55:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:55:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 04:56:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:56:06 [end_date_ymd] => 2025-03-02 04:56:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:56:06' and `end` < '2025-03-02 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-03-02 04:56:19] Production.INFO: count ==254 [2025-03-02 04:56:19] Production.ERROR: pbx CDR StartTime 2025-03-02 01:56:06 - End Time 2025-03-02 04:56:06 [2025-03-02 04:56:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:56:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588825', 'tblTempUsageDetail_20' ) start [2025-03-02 04:56:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588825', 'tblTempUsageDetail_20' ) end [2025-03-02 04:56:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588825', 'tblTempVendorCDR_20' ) start [2025-03-02 04:56:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588825', 'tblTempVendorCDR_20' ) end [2025-03-02 04:56:19] Production.INFO: ProcessCDR(1,14588825,1,1,2) [2025-03-02 04:56:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588825,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:56:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588825,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:56:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588825,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:56:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588825,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:56:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588825', 'tblTempUsageDetail_20' ) start [2025-03-02 04:56:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588825', 'tblTempUsageDetail_20' ) end [2025-03-02 04:56:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:56:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:56:22] Production.INFO: ==4976== Releasing lock... [2025-03-02 04:56:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:56:22] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 04:57:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:57:05 [end_date_ymd] => 2025-03-02 04:57:05 [RateCDR] => 1 ) [2025-03-02 04: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-03-02 01:57:05' and `end` < '2025-03-02 04: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-03-02 04:57:18] Production.INFO: count ==254 [2025-03-02 04:57:18] Production.ERROR: pbx CDR StartTime 2025-03-02 01:57:05 - End Time 2025-03-02 04:57:05 [2025-03-02 04:57:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588830', 'tblTempUsageDetail_20' ) start [2025-03-02 04:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588830', 'tblTempUsageDetail_20' ) end [2025-03-02 04:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588830', 'tblTempVendorCDR_20' ) start [2025-03-02 04:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588830', 'tblTempVendorCDR_20' ) end [2025-03-02 04:57:18] Production.INFO: ProcessCDR(1,14588830,1,1,2) [2025-03-02 04:57:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588830,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:57:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588830,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:57:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588830,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:57:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588830,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:57:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588830', 'tblTempUsageDetail_20' ) start [2025-03-02 04:57:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588830', 'tblTempUsageDetail_20' ) end [2025-03-02 04:57:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:57:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:57:22] Production.INFO: ==5137== Releasing lock... [2025-03-02 04:57:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:57:22] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 04:58:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:58:05 [end_date_ymd] => 2025-03-02 04:58:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:58:05' and `end` < '2025-03-02 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-03-02 04:58:19] Production.INFO: count ==253 [2025-03-02 04:58:19] Production.ERROR: pbx CDR StartTime 2025-03-02 01:58:05 - End Time 2025-03-02 04:58:05 [2025-03-02 04:58:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:58:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588835', 'tblTempUsageDetail_20' ) start [2025-03-02 04:58:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588835', 'tblTempUsageDetail_20' ) end [2025-03-02 04:58:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588835', 'tblTempVendorCDR_20' ) start [2025-03-02 04:58:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588835', 'tblTempVendorCDR_20' ) end [2025-03-02 04:58:19] Production.INFO: ProcessCDR(1,14588835,1,1,2) [2025-03-02 04:58:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588835,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:58:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588835,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:58:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588835,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:58:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588835,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:58:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588835', 'tblTempUsageDetail_20' ) start [2025-03-02 04:58:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588835', 'tblTempUsageDetail_20' ) end [2025-03-02 04:58:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:58:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:58:22] Production.INFO: ==5277== Releasing lock... [2025-03-02 04:58:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:58:22] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 04:59:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 01:59:05 [end_date_ymd] => 2025-03-02 04:59:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 01:59:05' and `end` < '2025-03-02 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-03-02 04:59:18] Production.INFO: count ==253 [2025-03-02 04:59:18] Production.ERROR: pbx CDR StartTime 2025-03-02 01:59:05 - End Time 2025-03-02 04:59:05 [2025-03-02 04:59:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 04:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588840', 'tblTempUsageDetail_20' ) start [2025-03-02 04:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588840', 'tblTempUsageDetail_20' ) end [2025-03-02 04:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588840', 'tblTempVendorCDR_20' ) start [2025-03-02 04:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588840', 'tblTempVendorCDR_20' ) end [2025-03-02 04:59:18] Production.INFO: ProcessCDR(1,14588840,1,1,2) [2025-03-02 04:59:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588840,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:59:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588840,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 04:59:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588840,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:59:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588840,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 04:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588840', 'tblTempUsageDetail_20' ) start [2025-03-02 04:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588840', 'tblTempUsageDetail_20' ) end [2025-03-02 04:59:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 04:59:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 04:59:21] Production.INFO: ==5376== Releasing lock... [2025-03-02 04:59:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 04:59:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 05:00:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:00:06 [end_date_ymd] => 2025-03-02 05:00:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:00:06' and `end` < '2025-03-02 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-03-02 05:00:18] Production.INFO: count ==242 [2025-03-02 05:00:18] Production.ERROR: pbx CDR StartTime 2025-03-02 02:00:06 - End Time 2025-03-02 05:00:06 [2025-03-02 05:00:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588846', 'tblTempUsageDetail_20' ) start [2025-03-02 05:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588846', 'tblTempUsageDetail_20' ) end [2025-03-02 05:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588846', 'tblTempVendorCDR_20' ) start [2025-03-02 05:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588846', 'tblTempVendorCDR_20' ) end [2025-03-02 05:00:18] Production.INFO: ProcessCDR(1,14588846,1,1,2) [2025-03-02 05:00:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588846,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:00:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588846,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:00:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588846,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:00:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588846,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:00:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588846', 'tblTempUsageDetail_20' ) start [2025-03-02 05:00:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588846', 'tblTempUsageDetail_20' ) end [2025-03-02 05:00:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:00:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:00:21] Production.INFO: ==5468== Releasing lock... [2025-03-02 05:00:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:00:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 05:01:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:01:05 [end_date_ymd] => 2025-03-02 05:01:05 [RateCDR] => 1 ) [2025-03-02 05: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-03-02 02:01:05' and `end` < '2025-03-02 05: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-03-02 05:01:17] Production.INFO: count ==230 [2025-03-02 05:01:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:01:05 - End Time 2025-03-02 05:01:05 [2025-03-02 05:01:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588851', 'tblTempUsageDetail_20' ) start [2025-03-02 05:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588851', 'tblTempUsageDetail_20' ) end [2025-03-02 05:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588851', 'tblTempVendorCDR_20' ) start [2025-03-02 05:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588851', 'tblTempVendorCDR_20' ) end [2025-03-02 05:01:17] Production.INFO: ProcessCDR(1,14588851,1,1,2) [2025-03-02 05:01:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588851,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:01:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588851,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:01:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588851,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:01:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588851,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588851', 'tblTempUsageDetail_20' ) start [2025-03-02 05:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588851', 'tblTempUsageDetail_20' ) end [2025-03-02 05:01:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:01:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:01:21] Production.INFO: ==5583== Releasing lock... [2025-03-02 05:01:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:01:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 05:02:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:02:04 [end_date_ymd] => 2025-03-02 05:02:04 [RateCDR] => 1 ) [2025-03-02 05:02: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-03-02 02:02:04' and `end` < '2025-03-02 05:02: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-03-02 05:02:18] Production.INFO: count ==230 [2025-03-02 05:02:18] Production.ERROR: pbx CDR StartTime 2025-03-02 02:02:04 - End Time 2025-03-02 05:02:04 [2025-03-02 05:02:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588856', 'tblTempUsageDetail_20' ) start [2025-03-02 05:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588856', 'tblTempUsageDetail_20' ) end [2025-03-02 05:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588856', 'tblTempVendorCDR_20' ) start [2025-03-02 05:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588856', 'tblTempVendorCDR_20' ) end [2025-03-02 05:02:18] Production.INFO: ProcessCDR(1,14588856,1,1,2) [2025-03-02 05:02:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588856,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:02:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588856,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:02:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588856,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:02:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588856,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:02:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588856', 'tblTempUsageDetail_20' ) start [2025-03-02 05:02:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588856', 'tblTempUsageDetail_20' ) end [2025-03-02 05:02:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:02:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:02:21] Production.INFO: ==5682== Releasing lock... [2025-03-02 05:02:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:02:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 05:03:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:03:05 [end_date_ymd] => 2025-03-02 05:03:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:03:05' and `end` < '2025-03-02 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-03-02 05:03:18] Production.INFO: count ==230 [2025-03-02 05:03:18] Production.ERROR: pbx CDR StartTime 2025-03-02 02:03:05 - End Time 2025-03-02 05:03:05 [2025-03-02 05:03:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588861', 'tblTempUsageDetail_20' ) start [2025-03-02 05:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588861', 'tblTempUsageDetail_20' ) end [2025-03-02 05:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588861', 'tblTempVendorCDR_20' ) start [2025-03-02 05:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588861', 'tblTempVendorCDR_20' ) end [2025-03-02 05:03:18] Production.INFO: ProcessCDR(1,14588861,1,1,2) [2025-03-02 05:03:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588861,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:03:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588861,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:03:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588861,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:03:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588861,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:03:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588861', 'tblTempUsageDetail_20' ) start [2025-03-02 05:03:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588861', 'tblTempUsageDetail_20' ) end [2025-03-02 05:03:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:03:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:03:21] Production.INFO: ==5822== Releasing lock... [2025-03-02 05:03:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:03:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 05:04:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:04:05 [end_date_ymd] => 2025-03-02 05:04:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:04:05' and `end` < '2025-03-02 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-03-02 05:04:17] Production.INFO: count ==234 [2025-03-02 05:04:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:04:05 - End Time 2025-03-02 05:04:05 [2025-03-02 05:04:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588866', 'tblTempUsageDetail_20' ) start [2025-03-02 05:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588866', 'tblTempUsageDetail_20' ) end [2025-03-02 05:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588866', 'tblTempVendorCDR_20' ) start [2025-03-02 05:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588866', 'tblTempVendorCDR_20' ) end [2025-03-02 05:04:17] Production.INFO: ProcessCDR(1,14588866,1,1,2) [2025-03-02 05:04:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588866,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:04:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588866,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:04:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588866,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:04:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588866,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:04:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588866', 'tblTempUsageDetail_20' ) start [2025-03-02 05:04:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588866', 'tblTempUsageDetail_20' ) end [2025-03-02 05:04:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:04:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:04:20] Production.INFO: ==5916== Releasing lock... [2025-03-02 05:04:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:04:20] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 05:05:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:05:05 [end_date_ymd] => 2025-03-02 05:05:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:05:05' and `end` < '2025-03-02 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-03-02 05:05:17] Production.INFO: count ==231 [2025-03-02 05:05:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:05:05 - End Time 2025-03-02 05:05:05 [2025-03-02 05:05:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588871', 'tblTempUsageDetail_20' ) start [2025-03-02 05:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588871', 'tblTempUsageDetail_20' ) end [2025-03-02 05:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588871', 'tblTempVendorCDR_20' ) start [2025-03-02 05:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588871', 'tblTempVendorCDR_20' ) end [2025-03-02 05:05:17] Production.INFO: ProcessCDR(1,14588871,1,1,2) [2025-03-02 05:05:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588871,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:05:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588871,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:05:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588871,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:05:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588871,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:05:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588871', 'tblTempUsageDetail_20' ) start [2025-03-02 05:05:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588871', 'tblTempUsageDetail_20' ) end [2025-03-02 05:05:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:05:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:05:20] Production.INFO: ==6011== Releasing lock... [2025-03-02 05:05:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:05:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 05:06:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:06:05 [end_date_ymd] => 2025-03-02 05:06:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:06:05' and `end` < '2025-03-02 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-03-02 05:06:17] Production.INFO: count ==229 [2025-03-02 05:06:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:06:05 - End Time 2025-03-02 05:06:05 [2025-03-02 05:06:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588876', 'tblTempUsageDetail_20' ) start [2025-03-02 05:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588876', 'tblTempUsageDetail_20' ) end [2025-03-02 05:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588876', 'tblTempVendorCDR_20' ) start [2025-03-02 05:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588876', 'tblTempVendorCDR_20' ) end [2025-03-02 05:06:17] Production.INFO: ProcessCDR(1,14588876,1,1,2) [2025-03-02 05:06:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588876,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:06:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588876,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:06:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588876,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:06:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588876,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:06:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588876', 'tblTempUsageDetail_20' ) start [2025-03-02 05:06:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588876', 'tblTempUsageDetail_20' ) end [2025-03-02 05:06:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:06:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:06:20] Production.INFO: ==6119== Releasing lock... [2025-03-02 05:06:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:06:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 05:07:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:07:05 [end_date_ymd] => 2025-03-02 05:07:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:07:05' and `end` < '2025-03-02 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-03-02 05:07:17] Production.INFO: count ==227 [2025-03-02 05:07:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:07:05 - End Time 2025-03-02 05:07:05 [2025-03-02 05:07:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588881', 'tblTempUsageDetail_20' ) start [2025-03-02 05:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588881', 'tblTempUsageDetail_20' ) end [2025-03-02 05:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588881', 'tblTempVendorCDR_20' ) start [2025-03-02 05:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588881', 'tblTempVendorCDR_20' ) end [2025-03-02 05:07:17] Production.INFO: ProcessCDR(1,14588881,1,1,2) [2025-03-02 05:07:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588881,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:07:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588881,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:07:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588881,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:07:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588881,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:07:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588881', 'tblTempUsageDetail_20' ) start [2025-03-02 05:07:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588881', 'tblTempUsageDetail_20' ) end [2025-03-02 05:07:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:07:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:07:20] Production.INFO: ==6212== Releasing lock... [2025-03-02 05:07:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:07:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 05:08:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:08:06 [end_date_ymd] => 2025-03-02 05:08:06 [RateCDR] => 1 ) [2025-03-02 05: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-03-02 02:08:06' and `end` < '2025-03-02 05: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-03-02 05:08:17] Production.INFO: count ==230 [2025-03-02 05:08:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:08:06 - End Time 2025-03-02 05:08:06 [2025-03-02 05:08:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588886', 'tblTempUsageDetail_20' ) start [2025-03-02 05:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588886', 'tblTempUsageDetail_20' ) end [2025-03-02 05:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588886', 'tblTempVendorCDR_20' ) start [2025-03-02 05:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588886', 'tblTempVendorCDR_20' ) end [2025-03-02 05:08:18] Production.INFO: ProcessCDR(1,14588886,1,1,2) [2025-03-02 05:08:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588886,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:08:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588886,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:08:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588886,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:08:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588886,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:08:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588886', 'tblTempUsageDetail_20' ) start [2025-03-02 05:08:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588886', 'tblTempUsageDetail_20' ) end [2025-03-02 05:08:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:08:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:08:21] Production.INFO: ==6317== Releasing lock... [2025-03-02 05:08:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:08:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 05:09:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:09:05 [end_date_ymd] => 2025-03-02 05:09:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:09:05' and `end` < '2025-03-02 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-03-02 05:09:17] Production.INFO: count ==230 [2025-03-02 05:09:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:09:05 - End Time 2025-03-02 05:09:05 [2025-03-02 05:09:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588891', 'tblTempUsageDetail_20' ) start [2025-03-02 05:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588891', 'tblTempUsageDetail_20' ) end [2025-03-02 05:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588891', 'tblTempVendorCDR_20' ) start [2025-03-02 05:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588891', 'tblTempVendorCDR_20' ) end [2025-03-02 05:09:17] Production.INFO: ProcessCDR(1,14588891,1,1,2) [2025-03-02 05:09:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588891,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:09:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588891,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:09:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588891,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:09:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588891,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:09:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588891', 'tblTempUsageDetail_20' ) start [2025-03-02 05:09:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588891', 'tblTempUsageDetail_20' ) end [2025-03-02 05:09:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:09:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:09:20] Production.INFO: ==6409== Releasing lock... [2025-03-02 05:09:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:09:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 05:10:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:10:06 [end_date_ymd] => 2025-03-02 05:10:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:10:06' and `end` < '2025-03-02 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-03-02 05:10:17] Production.INFO: count ==226 [2025-03-02 05:10:18] Production.ERROR: pbx CDR StartTime 2025-03-02 02:10:06 - End Time 2025-03-02 05:10:06 [2025-03-02 05:10:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588896', 'tblTempUsageDetail_20' ) start [2025-03-02 05:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588896', 'tblTempUsageDetail_20' ) end [2025-03-02 05:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588896', 'tblTempVendorCDR_20' ) start [2025-03-02 05:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588896', 'tblTempVendorCDR_20' ) end [2025-03-02 05:10:18] Production.INFO: ProcessCDR(1,14588896,1,1,2) [2025-03-02 05:10:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588896,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:10:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588896,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:10:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588896,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:10:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588896,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:10:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588896', 'tblTempUsageDetail_20' ) start [2025-03-02 05:10:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588896', 'tblTempUsageDetail_20' ) end [2025-03-02 05:10:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:10:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:10:21] Production.INFO: ==6508== Releasing lock... [2025-03-02 05:10:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:10:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 05:11:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:11:05 [end_date_ymd] => 2025-03-02 05:11:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:11:05' and `end` < '2025-03-02 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-03-02 05:11:17] Production.INFO: count ==218 [2025-03-02 05:11:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:11:05 - End Time 2025-03-02 05:11:05 [2025-03-02 05:11:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588902', 'tblTempUsageDetail_20' ) start [2025-03-02 05:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588902', 'tblTempUsageDetail_20' ) end [2025-03-02 05:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588902', 'tblTempVendorCDR_20' ) start [2025-03-02 05:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588902', 'tblTempVendorCDR_20' ) end [2025-03-02 05:11:17] Production.INFO: ProcessCDR(1,14588902,1,1,2) [2025-03-02 05:11:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588902,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:11:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588902,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:11:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588902,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:11:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588902,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:11:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588902', 'tblTempUsageDetail_20' ) start [2025-03-02 05:11:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588902', 'tblTempUsageDetail_20' ) end [2025-03-02 05:11:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:11:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:11:20] Production.INFO: ==6607== Releasing lock... [2025-03-02 05:11:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:11:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 05:12:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:12:05 [end_date_ymd] => 2025-03-02 05:12:05 [RateCDR] => 1 ) [2025-03-02 05: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-03-02 02:12:05' and `end` < '2025-03-02 05: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-03-02 05:12:17] Production.INFO: count ==218 [2025-03-02 05:12:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:12:05 - End Time 2025-03-02 05:12:05 [2025-03-02 05:12:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588907', 'tblTempUsageDetail_20' ) start [2025-03-02 05:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588907', 'tblTempUsageDetail_20' ) end [2025-03-02 05:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588907', 'tblTempVendorCDR_20' ) start [2025-03-02 05:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588907', 'tblTempVendorCDR_20' ) end [2025-03-02 05:12:17] Production.INFO: ProcessCDR(1,14588907,1,1,2) [2025-03-02 05:12:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588907,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:12:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588907,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:12:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588907,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:12:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588907,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:12:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588907', 'tblTempUsageDetail_20' ) start [2025-03-02 05:12:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588907', 'tblTempUsageDetail_20' ) end [2025-03-02 05:12:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:12:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:12:20] Production.INFO: ==6701== Releasing lock... [2025-03-02 05:12:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:12:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 05:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:13:05 [end_date_ymd] => 2025-03-02 05:13:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:13:05' and `end` < '2025-03-02 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-03-02 05:13:17] Production.INFO: count ==219 [2025-03-02 05:13:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:13:05 - End Time 2025-03-02 05:13:05 [2025-03-02 05:13:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588912', 'tblTempUsageDetail_20' ) start [2025-03-02 05:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588912', 'tblTempUsageDetail_20' ) end [2025-03-02 05:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588912', 'tblTempVendorCDR_20' ) start [2025-03-02 05:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588912', 'tblTempVendorCDR_20' ) end [2025-03-02 05:13:17] Production.INFO: ProcessCDR(1,14588912,1,1,2) [2025-03-02 05:13:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588912,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:13:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588912,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:13:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588912,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:13:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588912,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:13:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588912', 'tblTempUsageDetail_20' ) start [2025-03-02 05:13:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588912', 'tblTempUsageDetail_20' ) end [2025-03-02 05:13:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:13:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:13:21] Production.INFO: ==6800== Releasing lock... [2025-03-02 05:13:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:13:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 05:14:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:14:05 [end_date_ymd] => 2025-03-02 05:14:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:14:05' and `end` < '2025-03-02 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-03-02 05:14:17] Production.INFO: count ==219 [2025-03-02 05:14:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:14:05 - End Time 2025-03-02 05:14:05 [2025-03-02 05:14:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588917', 'tblTempUsageDetail_20' ) start [2025-03-02 05:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588917', 'tblTempUsageDetail_20' ) end [2025-03-02 05:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588917', 'tblTempVendorCDR_20' ) start [2025-03-02 05:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588917', 'tblTempVendorCDR_20' ) end [2025-03-02 05:14:17] Production.INFO: ProcessCDR(1,14588917,1,1,2) [2025-03-02 05:14:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588917,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:14:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588917,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:14:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588917,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:14:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588917,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:14:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588917', 'tblTempUsageDetail_20' ) start [2025-03-02 05:14:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588917', 'tblTempUsageDetail_20' ) end [2025-03-02 05:14:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:14:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:14:20] Production.INFO: ==6892== Releasing lock... [2025-03-02 05:14:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:14:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 05:15:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:15:04 [end_date_ymd] => 2025-03-02 05:15:04 [RateCDR] => 1 ) [2025-03-02 05: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-03-02 02:15:04' and `end` < '2025-03-02 05: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-03-02 05:15:16] Production.INFO: count ==217 [2025-03-02 05:15:16] Production.ERROR: pbx CDR StartTime 2025-03-02 02:15:04 - End Time 2025-03-02 05:15:04 [2025-03-02 05:15:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588922', 'tblTempUsageDetail_20' ) start [2025-03-02 05:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588922', 'tblTempUsageDetail_20' ) end [2025-03-02 05:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588922', 'tblTempVendorCDR_20' ) start [2025-03-02 05:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588922', 'tblTempVendorCDR_20' ) end [2025-03-02 05:15:16] Production.INFO: ProcessCDR(1,14588922,1,1,2) [2025-03-02 05:15:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588922,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:15:17] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588922,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:15:17] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588922,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:15:19] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588922,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:15:19] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588922', 'tblTempUsageDetail_20' ) start [2025-03-02 05:15:19] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588922', 'tblTempUsageDetail_20' ) end [2025-03-02 05:15:19] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:15:19] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:15:19] Production.INFO: ==6985== Releasing lock... [2025-03-02 05:15:19] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:15:19] Production.INFO: 29 MB #Memory Used# [2025-03-02 05:16:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:16:05 [end_date_ymd] => 2025-03-02 05:16:05 [RateCDR] => 1 ) [2025-03-02 05: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-03-02 02:16:05' and `end` < '2025-03-02 05: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-03-02 05:16:17] Production.INFO: count ==221 [2025-03-02 05:16:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:16:05 - End Time 2025-03-02 05:16:05 [2025-03-02 05:16:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588927', 'tblTempUsageDetail_20' ) start [2025-03-02 05:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588927', 'tblTempUsageDetail_20' ) end [2025-03-02 05:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588927', 'tblTempVendorCDR_20' ) start [2025-03-02 05:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588927', 'tblTempVendorCDR_20' ) end [2025-03-02 05:16:17] Production.INFO: ProcessCDR(1,14588927,1,1,2) [2025-03-02 05:16:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588927,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:16:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588927,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:16:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588927,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:16:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588927,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:16:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588927', 'tblTempUsageDetail_20' ) start [2025-03-02 05:16:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588927', 'tblTempUsageDetail_20' ) end [2025-03-02 05:16:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:16:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:16:20] Production.INFO: ==7060== Releasing lock... [2025-03-02 05:16:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:16:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 05:17:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:17:05 [end_date_ymd] => 2025-03-02 05:17:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:17:05' and `end` < '2025-03-02 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-03-02 05:17:17] Production.INFO: count ==224 [2025-03-02 05:17:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:17:05 - End Time 2025-03-02 05:17:05 [2025-03-02 05:17:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588932', 'tblTempUsageDetail_20' ) start [2025-03-02 05:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588932', 'tblTempUsageDetail_20' ) end [2025-03-02 05:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588932', 'tblTempVendorCDR_20' ) start [2025-03-02 05:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588932', 'tblTempVendorCDR_20' ) end [2025-03-02 05:17:17] Production.INFO: ProcessCDR(1,14588932,1,1,2) [2025-03-02 05:17:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588932,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:17:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588932,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:17:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588932,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:17:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588932,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:17:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588932', 'tblTempUsageDetail_20' ) start [2025-03-02 05:17:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588932', 'tblTempUsageDetail_20' ) end [2025-03-02 05:17:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:17:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:17:20] Production.INFO: ==7134== Releasing lock... [2025-03-02 05:17:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:17:20] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 05:18:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:18:05 [end_date_ymd] => 2025-03-02 05:18:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:18:05' and `end` < '2025-03-02 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-03-02 05:18:17] Production.INFO: count ==224 [2025-03-02 05:18:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:18:05 - End Time 2025-03-02 05:18:05 [2025-03-02 05:18:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588937', 'tblTempUsageDetail_20' ) start [2025-03-02 05:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588937', 'tblTempUsageDetail_20' ) end [2025-03-02 05:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588937', 'tblTempVendorCDR_20' ) start [2025-03-02 05:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588937', 'tblTempVendorCDR_20' ) end [2025-03-02 05:18:17] Production.INFO: ProcessCDR(1,14588937,1,1,2) [2025-03-02 05:18:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588937,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:18:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588937,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:18:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588937,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:18:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588937,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:18:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588937', 'tblTempUsageDetail_20' ) start [2025-03-02 05:18:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588937', 'tblTempUsageDetail_20' ) end [2025-03-02 05:18:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:18:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:18:20] Production.INFO: ==7255== Releasing lock... [2025-03-02 05:18:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:18:20] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 05:19:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:19:05 [end_date_ymd] => 2025-03-02 05:19:05 [RateCDR] => 1 ) [2025-03-02 05: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-03-02 02:19:05' and `end` < '2025-03-02 05: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-03-02 05:19:17] Production.INFO: count ==224 [2025-03-02 05:19:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:19:05 - End Time 2025-03-02 05:19:05 [2025-03-02 05:19:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588942', 'tblTempUsageDetail_20' ) start [2025-03-02 05:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588942', 'tblTempUsageDetail_20' ) end [2025-03-02 05:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588942', 'tblTempVendorCDR_20' ) start [2025-03-02 05:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588942', 'tblTempVendorCDR_20' ) end [2025-03-02 05:19:17] Production.INFO: ProcessCDR(1,14588942,1,1,2) [2025-03-02 05:19:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588942,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:19:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588942,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:19:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588942,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:19:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588942,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:19:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588942', 'tblTempUsageDetail_20' ) start [2025-03-02 05:19:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588942', 'tblTempUsageDetail_20' ) end [2025-03-02 05:19:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:19:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:19:20] Production.INFO: ==7348== Releasing lock... [2025-03-02 05:19:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:19:20] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 05:20:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:20:06 [end_date_ymd] => 2025-03-02 05:20:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:20:06' and `end` < '2025-03-02 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-03-02 05:20:18] Production.INFO: count ==224 [2025-03-02 05:20:18] Production.ERROR: pbx CDR StartTime 2025-03-02 02:20:06 - End Time 2025-03-02 05:20:06 [2025-03-02 05:20:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588947', 'tblTempUsageDetail_20' ) start [2025-03-02 05:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588947', 'tblTempUsageDetail_20' ) end [2025-03-02 05:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588947', 'tblTempVendorCDR_20' ) start [2025-03-02 05:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588947', 'tblTempVendorCDR_20' ) end [2025-03-02 05:20:18] Production.INFO: ProcessCDR(1,14588947,1,1,2) [2025-03-02 05:20:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588947,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:20:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588947,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:20:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588947,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:20:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588947,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:20:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588947', 'tblTempUsageDetail_20' ) start [2025-03-02 05:20:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588947', 'tblTempUsageDetail_20' ) end [2025-03-02 05:20:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:20:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:20:21] Production.INFO: ==7433== Releasing lock... [2025-03-02 05:20:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:20:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 05:21:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:21:04 [end_date_ymd] => 2025-03-02 05:21:04 [RateCDR] => 1 ) [2025-03-02 05:21: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-03-02 02:21:04' and `end` < '2025-03-02 05:21: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-03-02 05:21:16] Production.INFO: count ==224 [2025-03-02 05:21:16] Production.ERROR: pbx CDR StartTime 2025-03-02 02:21:04 - End Time 2025-03-02 05:21:04 [2025-03-02 05:21:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588953', 'tblTempUsageDetail_20' ) start [2025-03-02 05:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588953', 'tblTempUsageDetail_20' ) end [2025-03-02 05:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588953', 'tblTempVendorCDR_20' ) start [2025-03-02 05:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588953', 'tblTempVendorCDR_20' ) end [2025-03-02 05:21:16] Production.INFO: ProcessCDR(1,14588953,1,1,2) [2025-03-02 05:21:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588953,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:21:17] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588953,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:21:17] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588953,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:21:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588953,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:21:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588953', 'tblTempUsageDetail_20' ) start [2025-03-02 05:21:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588953', 'tblTempUsageDetail_20' ) end [2025-03-02 05:21:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:21:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:21:20] Production.INFO: ==7531== Releasing lock... [2025-03-02 05:21:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:21:20] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 05:22:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:22:06 [end_date_ymd] => 2025-03-02 05:22:06 [RateCDR] => 1 ) [2025-03-02 05: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-03-02 02:22:06' and `end` < '2025-03-02 05: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-03-02 05:22:17] Production.INFO: count ==224 [2025-03-02 05:22:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:22:06 - End Time 2025-03-02 05:22:06 [2025-03-02 05:22:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588958', 'tblTempUsageDetail_20' ) start [2025-03-02 05:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588958', 'tblTempUsageDetail_20' ) end [2025-03-02 05:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588958', 'tblTempVendorCDR_20' ) start [2025-03-02 05:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588958', 'tblTempVendorCDR_20' ) end [2025-03-02 05:22:17] Production.INFO: ProcessCDR(1,14588958,1,1,2) [2025-03-02 05:22:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588958,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:22:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588958,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:22:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588958,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:22:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588958,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588958', 'tblTempUsageDetail_20' ) start [2025-03-02 05:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588958', 'tblTempUsageDetail_20' ) end [2025-03-02 05:22:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:22:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:22:21] Production.INFO: ==7629== Releasing lock... [2025-03-02 05:22:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:22:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 05:23:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:23:05 [end_date_ymd] => 2025-03-02 05:23:05 [RateCDR] => 1 ) [2025-03-02 05: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-03-02 02:23:05' and `end` < '2025-03-02 05: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-03-02 05:23:17] Production.INFO: count ==224 [2025-03-02 05:23:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:23:05 - End Time 2025-03-02 05:23:05 [2025-03-02 05:23:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588963', 'tblTempUsageDetail_20' ) start [2025-03-02 05:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588963', 'tblTempUsageDetail_20' ) end [2025-03-02 05:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588963', 'tblTempVendorCDR_20' ) start [2025-03-02 05:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588963', 'tblTempVendorCDR_20' ) end [2025-03-02 05:23:17] Production.INFO: ProcessCDR(1,14588963,1,1,2) [2025-03-02 05:23:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588963,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:23:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588963,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:23:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588963,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:23:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588963,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:23:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588963', 'tblTempUsageDetail_20' ) start [2025-03-02 05:23:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588963', 'tblTempUsageDetail_20' ) end [2025-03-02 05:23:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:23:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:23:20] Production.INFO: ==7723== Releasing lock... [2025-03-02 05:23:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:23:20] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 05:24:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:24:05 [end_date_ymd] => 2025-03-02 05:24:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:24:05' and `end` < '2025-03-02 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-03-02 05:24:17] Production.INFO: count ==224 [2025-03-02 05:24:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:24:05 - End Time 2025-03-02 05:24:05 [2025-03-02 05:24:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588968', 'tblTempUsageDetail_20' ) start [2025-03-02 05:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588968', 'tblTempUsageDetail_20' ) end [2025-03-02 05:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588968', 'tblTempVendorCDR_20' ) start [2025-03-02 05:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588968', 'tblTempVendorCDR_20' ) end [2025-03-02 05:24:17] Production.INFO: ProcessCDR(1,14588968,1,1,2) [2025-03-02 05:24:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588968,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:24:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588968,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:24:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588968,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:24:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588968,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:24:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588968', 'tblTempUsageDetail_20' ) start [2025-03-02 05:24:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588968', 'tblTempUsageDetail_20' ) end [2025-03-02 05:24:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:24:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:24:20] Production.INFO: ==7820== Releasing lock... [2025-03-02 05:24:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:24:20] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 05:25:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:25:06 [end_date_ymd] => 2025-03-02 05:25:06 [RateCDR] => 1 ) [2025-03-02 05: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-03-02 02:25:06' and `end` < '2025-03-02 05: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-03-02 05:25:18] Production.INFO: count ==224 [2025-03-02 05:25:19] Production.ERROR: pbx CDR StartTime 2025-03-02 02:25:06 - End Time 2025-03-02 05:25:06 [2025-03-02 05:25:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:25:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588973', 'tblTempUsageDetail_20' ) start [2025-03-02 05:25:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588973', 'tblTempUsageDetail_20' ) end [2025-03-02 05:25:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588973', 'tblTempVendorCDR_20' ) start [2025-03-02 05:25:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588973', 'tblTempVendorCDR_20' ) end [2025-03-02 05:25:19] Production.INFO: ProcessCDR(1,14588973,1,1,2) [2025-03-02 05:25:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588973,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:25:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588973,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:25:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588973,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:25:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588973,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:25:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588973', 'tblTempUsageDetail_20' ) start [2025-03-02 05:25:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588973', 'tblTempUsageDetail_20' ) end [2025-03-02 05:25:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:25:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:25:22] Production.INFO: ==7899== Releasing lock... [2025-03-02 05:25:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:25:22] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 05:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:26:05 [end_date_ymd] => 2025-03-02 05:26:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:26:05' and `end` < '2025-03-02 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-03-02 05:26:17] Production.INFO: count ==224 [2025-03-02 05:26:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:26:05 - End Time 2025-03-02 05:26:05 [2025-03-02 05:26:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588978', 'tblTempUsageDetail_20' ) start [2025-03-02 05:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588978', 'tblTempUsageDetail_20' ) end [2025-03-02 05:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588978', 'tblTempVendorCDR_20' ) start [2025-03-02 05:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588978', 'tblTempVendorCDR_20' ) end [2025-03-02 05:26:17] Production.INFO: ProcessCDR(1,14588978,1,1,2) [2025-03-02 05:26:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588978,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:26:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588978,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:26:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588978,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:26:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588978,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:26:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588978', 'tblTempUsageDetail_20' ) start [2025-03-02 05:26:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588978', 'tblTempUsageDetail_20' ) end [2025-03-02 05:26:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:26:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:26:21] Production.INFO: ==7987== Releasing lock... [2025-03-02 05:26:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:26:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 05:27:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:27:06 [end_date_ymd] => 2025-03-02 05:27:06 [RateCDR] => 1 ) [2025-03-02 05: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-03-02 02:27:06' and `end` < '2025-03-02 05: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-03-02 05:27:18] Production.INFO: count ==224 [2025-03-02 05:27:18] Production.ERROR: pbx CDR StartTime 2025-03-02 02:27:06 - End Time 2025-03-02 05:27:06 [2025-03-02 05:27:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:27:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588983', 'tblTempUsageDetail_20' ) start [2025-03-02 05:27:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588983', 'tblTempUsageDetail_20' ) end [2025-03-02 05:27:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588983', 'tblTempVendorCDR_20' ) start [2025-03-02 05:27:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588983', 'tblTempVendorCDR_20' ) end [2025-03-02 05:27:18] Production.INFO: ProcessCDR(1,14588983,1,1,2) [2025-03-02 05:27:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588983,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:27:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588983,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:27:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588983,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:27:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588983,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:27:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588983', 'tblTempUsageDetail_20' ) start [2025-03-02 05:27:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588983', 'tblTempUsageDetail_20' ) end [2025-03-02 05:27:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:27:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:27:21] Production.INFO: ==8064== Releasing lock... [2025-03-02 05:27:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:27:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 05:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:28:05 [end_date_ymd] => 2025-03-02 05:28:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:28:05' and `end` < '2025-03-02 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-03-02 05:28:17] Production.INFO: count ==224 [2025-03-02 05:28:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:28:05 - End Time 2025-03-02 05:28:05 [2025-03-02 05:28:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588988', 'tblTempUsageDetail_20' ) start [2025-03-02 05:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588988', 'tblTempUsageDetail_20' ) end [2025-03-02 05:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588988', 'tblTempVendorCDR_20' ) start [2025-03-02 05:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588988', 'tblTempVendorCDR_20' ) end [2025-03-02 05:28:17] Production.INFO: ProcessCDR(1,14588988,1,1,2) [2025-03-02 05:28:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588988,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:28:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588988,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:28:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588988,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:28:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588988,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:28:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588988', 'tblTempUsageDetail_20' ) start [2025-03-02 05:28:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588988', 'tblTempUsageDetail_20' ) end [2025-03-02 05:28:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:28:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:28:20] Production.INFO: ==8159== Releasing lock... [2025-03-02 05:28:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:28:20] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 05:29:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:29:05 [end_date_ymd] => 2025-03-02 05:29:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:29:05' and `end` < '2025-03-02 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-03-02 05:29:17] Production.INFO: count ==224 [2025-03-02 05:29:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:29:05 - End Time 2025-03-02 05:29:05 [2025-03-02 05:29:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588993', 'tblTempUsageDetail_20' ) start [2025-03-02 05:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588993', 'tblTempUsageDetail_20' ) end [2025-03-02 05:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588993', 'tblTempVendorCDR_20' ) start [2025-03-02 05:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588993', 'tblTempVendorCDR_20' ) end [2025-03-02 05:29:17] Production.INFO: ProcessCDR(1,14588993,1,1,2) [2025-03-02 05:29:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588993,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:29:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588993,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:29:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588993,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:29:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588993,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:29:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588993', 'tblTempUsageDetail_20' ) start [2025-03-02 05:29:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588993', 'tblTempUsageDetail_20' ) end [2025-03-02 05:29:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:29:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:29:21] Production.INFO: ==8282== Releasing lock... [2025-03-02 05:29:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:29:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 05:30:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:30:06 [end_date_ymd] => 2025-03-02 05:30:06 [RateCDR] => 1 ) [2025-03-02 05: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-03-02 02:30:06' and `end` < '2025-03-02 05: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-03-02 05:30:18] Production.INFO: count ==217 [2025-03-02 05:30:18] Production.ERROR: pbx CDR StartTime 2025-03-02 02:30:06 - End Time 2025-03-02 05:30:06 [2025-03-02 05:30:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588999', 'tblTempUsageDetail_20' ) start [2025-03-02 05:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14588999', 'tblTempUsageDetail_20' ) end [2025-03-02 05:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588999', 'tblTempVendorCDR_20' ) start [2025-03-02 05:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14588999', 'tblTempVendorCDR_20' ) end [2025-03-02 05:30:18] Production.INFO: ProcessCDR(1,14588999,1,1,2) [2025-03-02 05:30:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14588999,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:30:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14588999,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:30:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14588999,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:30:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14588999,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:30:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588999', 'tblTempUsageDetail_20' ) start [2025-03-02 05:30:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14588999', 'tblTempUsageDetail_20' ) end [2025-03-02 05:30:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:30:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:30:21] Production.INFO: ==8361== Releasing lock... [2025-03-02 05:30:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:30:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 05:31:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:31:05 [end_date_ymd] => 2025-03-02 05:31:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:31:05' and `end` < '2025-03-02 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-03-02 05:31:17] Production.INFO: count ==210 [2025-03-02 05:31:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:31:05 - End Time 2025-03-02 05:31:05 [2025-03-02 05:31:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589004', 'tblTempUsageDetail_20' ) start [2025-03-02 05:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589004', 'tblTempUsageDetail_20' ) end [2025-03-02 05:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589004', 'tblTempVendorCDR_20' ) start [2025-03-02 05:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589004', 'tblTempVendorCDR_20' ) end [2025-03-02 05:31:17] Production.INFO: ProcessCDR(1,14589004,1,1,2) [2025-03-02 05:31:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589004,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:31:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589004,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:31:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589004,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:31:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589004,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:31:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589004', 'tblTempUsageDetail_20' ) start [2025-03-02 05:31:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589004', 'tblTempUsageDetail_20' ) end [2025-03-02 05:31:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:31:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:31:21] Production.INFO: ==8442== Releasing lock... [2025-03-02 05:31:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:31:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 05:32:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:32:05 [end_date_ymd] => 2025-03-02 05:32:05 [RateCDR] => 1 ) [2025-03-02 05: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-03-02 02:32:05' and `end` < '2025-03-02 05: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-03-02 05:32:17] Production.INFO: count ==210 [2025-03-02 05:32:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:32:05 - End Time 2025-03-02 05:32:05 [2025-03-02 05:32:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589009', 'tblTempUsageDetail_20' ) start [2025-03-02 05:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589009', 'tblTempUsageDetail_20' ) end [2025-03-02 05:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589009', 'tblTempVendorCDR_20' ) start [2025-03-02 05:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589009', 'tblTempVendorCDR_20' ) end [2025-03-02 05:32:17] Production.INFO: ProcessCDR(1,14589009,1,1,2) [2025-03-02 05:32:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589009,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:32:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589009,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:32:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589009,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:32:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589009,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:32:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589009', 'tblTempUsageDetail_20' ) start [2025-03-02 05:32:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589009', 'tblTempUsageDetail_20' ) end [2025-03-02 05:32:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:32:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:32:21] Production.INFO: ==8523== Releasing lock... [2025-03-02 05:32:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:32:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 05:33:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:33:05 [end_date_ymd] => 2025-03-02 05:33:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:33:05' and `end` < '2025-03-02 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-03-02 05:33:17] Production.INFO: count ==210 [2025-03-02 05:33:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:33:05 - End Time 2025-03-02 05:33:05 [2025-03-02 05:33:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589014', 'tblTempUsageDetail_20' ) start [2025-03-02 05:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589014', 'tblTempUsageDetail_20' ) end [2025-03-02 05:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589014', 'tblTempVendorCDR_20' ) start [2025-03-02 05:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589014', 'tblTempVendorCDR_20' ) end [2025-03-02 05:33:17] Production.INFO: ProcessCDR(1,14589014,1,1,2) [2025-03-02 05:33:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589014,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:33:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589014,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:33:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589014,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:33:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589014,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:33:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589014', 'tblTempUsageDetail_20' ) start [2025-03-02 05:33:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589014', 'tblTempUsageDetail_20' ) end [2025-03-02 05:33:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:33:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:33:20] Production.INFO: ==8611== Releasing lock... [2025-03-02 05:33:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:33:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 05:34:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:34:05 [end_date_ymd] => 2025-03-02 05:34:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:34:05' and `end` < '2025-03-02 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-03-02 05:34:16] Production.INFO: count ==210 [2025-03-02 05:34:16] Production.ERROR: pbx CDR StartTime 2025-03-02 02:34:05 - End Time 2025-03-02 05:34:05 [2025-03-02 05:34:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589019', 'tblTempUsageDetail_20' ) start [2025-03-02 05:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589019', 'tblTempUsageDetail_20' ) end [2025-03-02 05:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589019', 'tblTempVendorCDR_20' ) start [2025-03-02 05:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589019', 'tblTempVendorCDR_20' ) end [2025-03-02 05:34:16] Production.INFO: ProcessCDR(1,14589019,1,1,2) [2025-03-02 05:34:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589019,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:34:17] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589019,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:34:17] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589019,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:34:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589019,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:34:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589019', 'tblTempUsageDetail_20' ) start [2025-03-02 05:34:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589019', 'tblTempUsageDetail_20' ) end [2025-03-02 05:34:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:34:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:34:20] Production.INFO: ==8733== Releasing lock... [2025-03-02 05:34:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:34:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 05:35:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:35:05 [end_date_ymd] => 2025-03-02 05:35:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:35:05' and `end` < '2025-03-02 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-03-02 05:35:17] Production.INFO: count ==210 [2025-03-02 05:35:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:35:05 - End Time 2025-03-02 05:35:05 [2025-03-02 05:35:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589024', 'tblTempUsageDetail_20' ) start [2025-03-02 05:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589024', 'tblTempUsageDetail_20' ) end [2025-03-02 05:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589024', 'tblTempVendorCDR_20' ) start [2025-03-02 05:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589024', 'tblTempVendorCDR_20' ) end [2025-03-02 05:35:17] Production.INFO: ProcessCDR(1,14589024,1,1,2) [2025-03-02 05:35:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589024,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:35:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589024,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:35:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589024,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:35:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589024,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:35:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589024', 'tblTempUsageDetail_20' ) start [2025-03-02 05:35:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589024', 'tblTempUsageDetail_20' ) end [2025-03-02 05:35:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:35:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:35:20] Production.INFO: ==8818== Releasing lock... [2025-03-02 05:35:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:35:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 05:36:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:36:05 [end_date_ymd] => 2025-03-02 05:36:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:36:05' and `end` < '2025-03-02 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-03-02 05:36:17] Production.INFO: count ==210 [2025-03-02 05:36:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:36:05 - End Time 2025-03-02 05:36:05 [2025-03-02 05:36:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589029', 'tblTempUsageDetail_20' ) start [2025-03-02 05:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589029', 'tblTempUsageDetail_20' ) end [2025-03-02 05:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589029', 'tblTempVendorCDR_20' ) start [2025-03-02 05:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589029', 'tblTempVendorCDR_20' ) end [2025-03-02 05:36:17] Production.INFO: ProcessCDR(1,14589029,1,1,2) [2025-03-02 05:36:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589029,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:36:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589029,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:36:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589029,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:36:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589029,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:36:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589029', 'tblTempUsageDetail_20' ) start [2025-03-02 05:36:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589029', 'tblTempUsageDetail_20' ) end [2025-03-02 05:36:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:36:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:36:20] Production.INFO: ==8902== Releasing lock... [2025-03-02 05:36:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:36:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 05:37:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:37:05 [end_date_ymd] => 2025-03-02 05:37:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:37:05' and `end` < '2025-03-02 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-03-02 05:37:17] Production.INFO: count ==210 [2025-03-02 05:37:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:37:05 - End Time 2025-03-02 05:37:05 [2025-03-02 05:37:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589034', 'tblTempUsageDetail_20' ) start [2025-03-02 05:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589034', 'tblTempUsageDetail_20' ) end [2025-03-02 05:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589034', 'tblTempVendorCDR_20' ) start [2025-03-02 05:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589034', 'tblTempVendorCDR_20' ) end [2025-03-02 05:37:17] Production.INFO: ProcessCDR(1,14589034,1,1,2) [2025-03-02 05:37:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589034,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:37:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589034,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:37:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589034,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:37:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589034,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:37:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589034', 'tblTempUsageDetail_20' ) start [2025-03-02 05:37:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589034', 'tblTempUsageDetail_20' ) end [2025-03-02 05:37:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:37:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:37:20] Production.INFO: ==8980== Releasing lock... [2025-03-02 05:37:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:37:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 05:38:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:38:06 [end_date_ymd] => 2025-03-02 05:38:06 [RateCDR] => 1 ) [2025-03-02 05: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-03-02 02:38:06' and `end` < '2025-03-02 05: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-03-02 05:38:18] Production.INFO: count ==210 [2025-03-02 05:38:18] Production.ERROR: pbx CDR StartTime 2025-03-02 02:38:06 - End Time 2025-03-02 05:38:06 [2025-03-02 05:38:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589039', 'tblTempUsageDetail_20' ) start [2025-03-02 05:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589039', 'tblTempUsageDetail_20' ) end [2025-03-02 05:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589039', 'tblTempVendorCDR_20' ) start [2025-03-02 05:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589039', 'tblTempVendorCDR_20' ) end [2025-03-02 05:38:18] Production.INFO: ProcessCDR(1,14589039,1,1,2) [2025-03-02 05:38:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589039,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:38:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589039,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:38:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589039,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:38:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589039,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589039', 'tblTempUsageDetail_20' ) start [2025-03-02 05:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589039', 'tblTempUsageDetail_20' ) end [2025-03-02 05:38:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:38:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:38:21] Production.INFO: ==9056== Releasing lock... [2025-03-02 05:38:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:38:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 05:39:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:39:05 [end_date_ymd] => 2025-03-02 05:39:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:39:05' and `end` < '2025-03-02 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-03-02 05:39:17] Production.INFO: count ==210 [2025-03-02 05:39:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:39:05 - End Time 2025-03-02 05:39:05 [2025-03-02 05:39:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589044', 'tblTempUsageDetail_20' ) start [2025-03-02 05:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589044', 'tblTempUsageDetail_20' ) end [2025-03-02 05:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589044', 'tblTempVendorCDR_20' ) start [2025-03-02 05:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589044', 'tblTempVendorCDR_20' ) end [2025-03-02 05:39:17] Production.INFO: ProcessCDR(1,14589044,1,1,2) [2025-03-02 05:39:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589044,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:39:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589044,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:39:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589044,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:39:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589044,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:39:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589044', 'tblTempUsageDetail_20' ) start [2025-03-02 05:39:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589044', 'tblTempUsageDetail_20' ) end [2025-03-02 05:39:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:39:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:39:20] Production.INFO: ==9131== Releasing lock... [2025-03-02 05:39:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:39:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 05:40:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:40:06 [end_date_ymd] => 2025-03-02 05:40:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:40:06' and `end` < '2025-03-02 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-03-02 05:40:18] Production.INFO: count ==206 [2025-03-02 05:40:18] Production.ERROR: pbx CDR StartTime 2025-03-02 02:40:06 - End Time 2025-03-02 05:40:06 [2025-03-02 05:40:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589050', 'tblTempUsageDetail_20' ) start [2025-03-02 05:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589050', 'tblTempUsageDetail_20' ) end [2025-03-02 05:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589050', 'tblTempVendorCDR_20' ) start [2025-03-02 05:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589050', 'tblTempVendorCDR_20' ) end [2025-03-02 05:40:18] Production.INFO: ProcessCDR(1,14589050,1,1,2) [2025-03-02 05:40:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589050,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:40:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589050,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:40:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589050,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:40:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589050,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:40:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589050', 'tblTempUsageDetail_20' ) start [2025-03-02 05:40:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589050', 'tblTempUsageDetail_20' ) end [2025-03-02 05:40:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:40:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:40:21] Production.INFO: ==9217== Releasing lock... [2025-03-02 05:40:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:40:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 05:41:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:41:05 [end_date_ymd] => 2025-03-02 05:41:05 [RateCDR] => 1 ) [2025-03-02 05: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-03-02 02:41:05' and `end` < '2025-03-02 05: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-03-02 05:41:17] Production.INFO: count ==199 [2025-03-02 05:41:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:41:05 - End Time 2025-03-02 05:41:05 [2025-03-02 05:41:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589055', 'tblTempUsageDetail_20' ) start [2025-03-02 05:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589055', 'tblTempUsageDetail_20' ) end [2025-03-02 05:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589055', 'tblTempVendorCDR_20' ) start [2025-03-02 05:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589055', 'tblTempVendorCDR_20' ) end [2025-03-02 05:41:17] Production.INFO: ProcessCDR(1,14589055,1,1,2) [2025-03-02 05:41:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589055,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:41:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589055,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:41:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589055,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:41:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589055,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:41:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589055', 'tblTempUsageDetail_20' ) start [2025-03-02 05:41:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589055', 'tblTempUsageDetail_20' ) end [2025-03-02 05:41:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:41:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:41:20] Production.INFO: ==9301== Releasing lock... [2025-03-02 05:41:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:41:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 05:42:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:42:05 [end_date_ymd] => 2025-03-02 05:42:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:42:05' and `end` < '2025-03-02 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-03-02 05:42:17] Production.INFO: count ==198 [2025-03-02 05:42:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:42:05 - End Time 2025-03-02 05:42:05 [2025-03-02 05:42:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589060', 'tblTempUsageDetail_20' ) start [2025-03-02 05:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589060', 'tblTempUsageDetail_20' ) end [2025-03-02 05:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589060', 'tblTempVendorCDR_20' ) start [2025-03-02 05:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589060', 'tblTempVendorCDR_20' ) end [2025-03-02 05:42:17] Production.INFO: ProcessCDR(1,14589060,1,1,2) [2025-03-02 05:42:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589060,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:42:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589060,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:42:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589060,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:42:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589060,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:42:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589060', 'tblTempUsageDetail_20' ) start [2025-03-02 05:42:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589060', 'tblTempUsageDetail_20' ) end [2025-03-02 05:42:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:42:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:42:20] Production.INFO: ==9384== Releasing lock... [2025-03-02 05:42:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:42:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 05:43:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:43:05 [end_date_ymd] => 2025-03-02 05:43:05 [RateCDR] => 1 ) [2025-03-02 05: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-03-02 02:43:05' and `end` < '2025-03-02 05: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-03-02 05:43:17] Production.INFO: count ==198 [2025-03-02 05:43:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:43:05 - End Time 2025-03-02 05:43:05 [2025-03-02 05:43:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589065', 'tblTempUsageDetail_20' ) start [2025-03-02 05:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589065', 'tblTempUsageDetail_20' ) end [2025-03-02 05:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589065', 'tblTempVendorCDR_20' ) start [2025-03-02 05:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589065', 'tblTempVendorCDR_20' ) end [2025-03-02 05:43:17] Production.INFO: ProcessCDR(1,14589065,1,1,2) [2025-03-02 05:43:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589065,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:43:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589065,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:43:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589065,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:43:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589065,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:43:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589065', 'tblTempUsageDetail_20' ) start [2025-03-02 05:43:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589065', 'tblTempUsageDetail_20' ) end [2025-03-02 05:43:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:43:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:43:20] Production.INFO: ==9475== Releasing lock... [2025-03-02 05:43:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:43:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 05:44:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:44:05 [end_date_ymd] => 2025-03-02 05:44:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:44:05' and `end` < '2025-03-02 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-03-02 05:44:17] Production.INFO: count ==195 [2025-03-02 05:44:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:44:05 - End Time 2025-03-02 05:44:05 [2025-03-02 05:44:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589070', 'tblTempUsageDetail_20' ) start [2025-03-02 05:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589070', 'tblTempUsageDetail_20' ) end [2025-03-02 05:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589070', 'tblTempVendorCDR_20' ) start [2025-03-02 05:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589070', 'tblTempVendorCDR_20' ) end [2025-03-02 05:44:17] Production.INFO: ProcessCDR(1,14589070,1,1,2) [2025-03-02 05:44:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589070,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:44:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589070,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:44:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589070,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:44:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589070,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:44:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589070', 'tblTempUsageDetail_20' ) start [2025-03-02 05:44:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589070', 'tblTempUsageDetail_20' ) end [2025-03-02 05:44:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:44:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:44:20] Production.INFO: ==9569== Releasing lock... [2025-03-02 05:44:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:44:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 05:45:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:45:05 [end_date_ymd] => 2025-03-02 05:45:05 [RateCDR] => 1 ) [2025-03-02 05: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-03-02 02:45:05' and `end` < '2025-03-02 05: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-03-02 05:45:17] Production.INFO: count ==189 [2025-03-02 05:45:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:45:05 - End Time 2025-03-02 05:45:05 [2025-03-02 05:45:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589075', 'tblTempUsageDetail_20' ) start [2025-03-02 05:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589075', 'tblTempUsageDetail_20' ) end [2025-03-02 05:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589075', 'tblTempVendorCDR_20' ) start [2025-03-02 05:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589075', 'tblTempVendorCDR_20' ) end [2025-03-02 05:45:17] Production.INFO: ProcessCDR(1,14589075,1,1,2) [2025-03-02 05:45:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589075,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:45:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589075,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:45:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589075,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:45:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589075,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:45:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589075', 'tblTempUsageDetail_20' ) start [2025-03-02 05:45:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589075', 'tblTempUsageDetail_20' ) end [2025-03-02 05:45:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:45:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:45:20] Production.INFO: ==9656== Releasing lock... [2025-03-02 05:45:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:45:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 05:46:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:46:05 [end_date_ymd] => 2025-03-02 05:46:05 [RateCDR] => 1 ) [2025-03-02 05: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-03-02 02:46:05' and `end` < '2025-03-02 05: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-03-02 05:46:17] Production.INFO: count ==179 [2025-03-02 05:46:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:46:05 - End Time 2025-03-02 05:46:05 [2025-03-02 05:46:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589080', 'tblTempUsageDetail_20' ) start [2025-03-02 05:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589080', 'tblTempUsageDetail_20' ) end [2025-03-02 05:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589080', 'tblTempVendorCDR_20' ) start [2025-03-02 05:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589080', 'tblTempVendorCDR_20' ) end [2025-03-02 05:46:17] Production.INFO: ProcessCDR(1,14589080,1,1,2) [2025-03-02 05:46:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589080,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:46:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589080,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:46:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589080,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:46:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589080,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:46:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589080', 'tblTempUsageDetail_20' ) start [2025-03-02 05:46:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589080', 'tblTempUsageDetail_20' ) end [2025-03-02 05:46:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:46:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:46:20] Production.INFO: ==9738== Releasing lock... [2025-03-02 05:46:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:46:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 05:47:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:47:05 [end_date_ymd] => 2025-03-02 05:47:05 [RateCDR] => 1 ) [2025-03-02 05: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-03-02 02:47:05' and `end` < '2025-03-02 05: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-03-02 05:47:17] Production.INFO: count ==179 [2025-03-02 05:47:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:47:05 - End Time 2025-03-02 05:47:05 [2025-03-02 05:47:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589085', 'tblTempUsageDetail_20' ) start [2025-03-02 05:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589085', 'tblTempUsageDetail_20' ) end [2025-03-02 05:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589085', 'tblTempVendorCDR_20' ) start [2025-03-02 05:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589085', 'tblTempVendorCDR_20' ) end [2025-03-02 05:47:17] Production.INFO: ProcessCDR(1,14589085,1,1,2) [2025-03-02 05:47:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589085,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:47:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589085,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:47:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589085,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:47:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589085,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:47:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589085', 'tblTempUsageDetail_20' ) start [2025-03-02 05:47:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589085', 'tblTempUsageDetail_20' ) end [2025-03-02 05:47:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:47:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:47:20] Production.INFO: ==9823== Releasing lock... [2025-03-02 05:47:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:47:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 05:48:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:48:05 [end_date_ymd] => 2025-03-02 05:48:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:48:05' and `end` < '2025-03-02 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-03-02 05:48:17] Production.INFO: count ==179 [2025-03-02 05:48:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:48:05 - End Time 2025-03-02 05:48:05 [2025-03-02 05:48:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589090', 'tblTempUsageDetail_20' ) start [2025-03-02 05:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589090', 'tblTempUsageDetail_20' ) end [2025-03-02 05:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589090', 'tblTempVendorCDR_20' ) start [2025-03-02 05:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589090', 'tblTempVendorCDR_20' ) end [2025-03-02 05:48:17] Production.INFO: ProcessCDR(1,14589090,1,1,2) [2025-03-02 05:48:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589090,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:48:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589090,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:48:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589090,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:48:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589090,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:48:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589090', 'tblTempUsageDetail_20' ) start [2025-03-02 05:48:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589090', 'tblTempUsageDetail_20' ) end [2025-03-02 05:48:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:48:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:48:20] Production.INFO: ==9905== Releasing lock... [2025-03-02 05:48:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:48:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 05:49:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:49:05 [end_date_ymd] => 2025-03-02 05:49:05 [RateCDR] => 1 ) [2025-03-02 05: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-03-02 02:49:05' and `end` < '2025-03-02 05: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-03-02 05:49:17] Production.INFO: count ==176 [2025-03-02 05:49:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:49:05 - End Time 2025-03-02 05:49:05 [2025-03-02 05:49:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589095', 'tblTempUsageDetail_20' ) start [2025-03-02 05:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589095', 'tblTempUsageDetail_20' ) end [2025-03-02 05:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589095', 'tblTempVendorCDR_20' ) start [2025-03-02 05:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589095', 'tblTempVendorCDR_20' ) end [2025-03-02 05:49:17] Production.INFO: ProcessCDR(1,14589095,1,1,2) [2025-03-02 05:49:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589095,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:49:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589095,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:49:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589095,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:49:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589095,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:49:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589095', 'tblTempUsageDetail_20' ) start [2025-03-02 05:49:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589095', 'tblTempUsageDetail_20' ) end [2025-03-02 05:49:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:49:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:49:20] Production.INFO: ==10030== Releasing lock... [2025-03-02 05:49:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:49:20] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 05:50:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:50:06 [end_date_ymd] => 2025-03-02 05:50:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:50:06' and `end` < '2025-03-02 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-03-02 05:50:18] Production.INFO: count ==169 [2025-03-02 05:50:18] Production.ERROR: pbx CDR StartTime 2025-03-02 02:50:06 - End Time 2025-03-02 05:50:06 [2025-03-02 05:50:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589100', 'tblTempUsageDetail_20' ) start [2025-03-02 05:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589100', 'tblTempUsageDetail_20' ) end [2025-03-02 05:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589100', 'tblTempVendorCDR_20' ) start [2025-03-02 05:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589100', 'tblTempVendorCDR_20' ) end [2025-03-02 05:50:18] Production.INFO: ProcessCDR(1,14589100,1,1,2) [2025-03-02 05:50:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589100,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:50:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589100,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:50:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589100,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:50:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589100,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:50:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589100', 'tblTempUsageDetail_20' ) start [2025-03-02 05:50:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589100', 'tblTempUsageDetail_20' ) end [2025-03-02 05:50:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:50:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:50:21] Production.INFO: ==10130== Releasing lock... [2025-03-02 05:50:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:50:21] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 05:51:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:51:05 [end_date_ymd] => 2025-03-02 05:51:05 [RateCDR] => 1 ) [2025-03-02 05: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-03-02 02:51:05' and `end` < '2025-03-02 05: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-03-02 05:51:17] Production.INFO: count ==159 [2025-03-02 05:51:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:51:05 - End Time 2025-03-02 05:51:05 [2025-03-02 05:51:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589106', 'tblTempUsageDetail_20' ) start [2025-03-02 05:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589106', 'tblTempUsageDetail_20' ) end [2025-03-02 05:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589106', 'tblTempVendorCDR_20' ) start [2025-03-02 05:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589106', 'tblTempVendorCDR_20' ) end [2025-03-02 05:51:17] Production.INFO: ProcessCDR(1,14589106,1,1,2) [2025-03-02 05:51:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589106,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:51:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589106,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:51:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589106,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:51:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589106,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:51:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589106', 'tblTempUsageDetail_20' ) start [2025-03-02 05:51:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589106', 'tblTempUsageDetail_20' ) end [2025-03-02 05:51:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:51:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:51:20] Production.INFO: ==10215== Releasing lock... [2025-03-02 05:51:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:51:20] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 05:52:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:52:05 [end_date_ymd] => 2025-03-02 05:52:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:52:05' and `end` < '2025-03-02 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-03-02 05:52:17] Production.INFO: count ==159 [2025-03-02 05:52:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:52:05 - End Time 2025-03-02 05:52:05 [2025-03-02 05:52:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589111', 'tblTempUsageDetail_20' ) start [2025-03-02 05:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589111', 'tblTempUsageDetail_20' ) end [2025-03-02 05:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589111', 'tblTempVendorCDR_20' ) start [2025-03-02 05:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589111', 'tblTempVendorCDR_20' ) end [2025-03-02 05:52:17] Production.INFO: ProcessCDR(1,14589111,1,1,2) [2025-03-02 05:52:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589111,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:52:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589111,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:52:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589111,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:52:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589111,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:52:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589111', 'tblTempUsageDetail_20' ) start [2025-03-02 05:52:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589111', 'tblTempUsageDetail_20' ) end [2025-03-02 05:52:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:52:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:52:21] Production.INFO: ==10294== Releasing lock... [2025-03-02 05:52:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:52:21] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 05:53:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:53:06 [end_date_ymd] => 2025-03-02 05:53:06 [RateCDR] => 1 ) [2025-03-02 05: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-03-02 02:53:06' and `end` < '2025-03-02 05: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-03-02 05:53:17] Production.INFO: count ==159 [2025-03-02 05:53:18] Production.ERROR: pbx CDR StartTime 2025-03-02 02:53:06 - End Time 2025-03-02 05:53:06 [2025-03-02 05:53:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:53:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589116', 'tblTempUsageDetail_20' ) start [2025-03-02 05:53:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589116', 'tblTempUsageDetail_20' ) end [2025-03-02 05:53:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589116', 'tblTempVendorCDR_20' ) start [2025-03-02 05:53:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589116', 'tblTempVendorCDR_20' ) end [2025-03-02 05:53:18] Production.INFO: ProcessCDR(1,14589116,1,1,2) [2025-03-02 05:53:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589116,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:53:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589116,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:53:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589116,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:53:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589116,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589116', 'tblTempUsageDetail_20' ) start [2025-03-02 05:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589116', 'tblTempUsageDetail_20' ) end [2025-03-02 05:53:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:53:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:53:21] Production.INFO: ==10369== Releasing lock... [2025-03-02 05:53:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:53:21] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 05:54:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:54:05 [end_date_ymd] => 2025-03-02 05:54:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:54:05' and `end` < '2025-03-02 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-03-02 05:54:17] Production.INFO: count ==159 [2025-03-02 05:54:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:54:05 - End Time 2025-03-02 05:54:05 [2025-03-02 05:54:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589121', 'tblTempUsageDetail_20' ) start [2025-03-02 05:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589121', 'tblTempUsageDetail_20' ) end [2025-03-02 05:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589121', 'tblTempVendorCDR_20' ) start [2025-03-02 05:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589121', 'tblTempVendorCDR_20' ) end [2025-03-02 05:54:17] Production.INFO: ProcessCDR(1,14589121,1,1,2) [2025-03-02 05:54:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589121,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:54:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589121,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:54:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589121,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:54:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589121,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:54:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589121', 'tblTempUsageDetail_20' ) start [2025-03-02 05:54:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589121', 'tblTempUsageDetail_20' ) end [2025-03-02 05:54:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:54:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:54:20] Production.INFO: ==10458== Releasing lock... [2025-03-02 05:54:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:54:20] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 05:55:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:55:05 [end_date_ymd] => 2025-03-02 05:55:05 [RateCDR] => 1 ) [2025-03-02 05: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-03-02 02:55:05' and `end` < '2025-03-02 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-03-02 05:55:17] Production.INFO: count ==159 [2025-03-02 05:55:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:55:05 - End Time 2025-03-02 05:55:05 [2025-03-02 05:55:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589126', 'tblTempUsageDetail_20' ) start [2025-03-02 05:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589126', 'tblTempUsageDetail_20' ) end [2025-03-02 05:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589126', 'tblTempVendorCDR_20' ) start [2025-03-02 05:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589126', 'tblTempVendorCDR_20' ) end [2025-03-02 05:55:17] Production.INFO: ProcessCDR(1,14589126,1,1,2) [2025-03-02 05:55:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589126,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:55:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589126,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:55:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589126,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:55:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589126,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589126', 'tblTempUsageDetail_20' ) start [2025-03-02 05:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589126', 'tblTempUsageDetail_20' ) end [2025-03-02 05:55:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:55:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:55:21] Production.INFO: ==10543== Releasing lock... [2025-03-02 05:55:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:55:21] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 05:56:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:56:05 [end_date_ymd] => 2025-03-02 05:56:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:56:05' and `end` < '2025-03-02 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-03-02 05:56:17] Production.INFO: count ==159 [2025-03-02 05:56:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:56:05 - End Time 2025-03-02 05:56:05 [2025-03-02 05:56:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589131', 'tblTempUsageDetail_20' ) start [2025-03-02 05:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589131', 'tblTempUsageDetail_20' ) end [2025-03-02 05:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589131', 'tblTempVendorCDR_20' ) start [2025-03-02 05:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589131', 'tblTempVendorCDR_20' ) end [2025-03-02 05:56:17] Production.INFO: ProcessCDR(1,14589131,1,1,2) [2025-03-02 05:56:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589131,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:56:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589131,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:56:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589131,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:56:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589131,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:56:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589131', 'tblTempUsageDetail_20' ) start [2025-03-02 05:56:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589131', 'tblTempUsageDetail_20' ) end [2025-03-02 05:56:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:56:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:56:20] Production.INFO: ==10627== Releasing lock... [2025-03-02 05:56:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:56:20] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 05:57:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:57:05 [end_date_ymd] => 2025-03-02 05:57:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:57:05' and `end` < '2025-03-02 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-03-02 05:57:17] Production.INFO: count ==159 [2025-03-02 05:57:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:57:05 - End Time 2025-03-02 05:57:05 [2025-03-02 05:57:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589136', 'tblTempUsageDetail_20' ) start [2025-03-02 05:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589136', 'tblTempUsageDetail_20' ) end [2025-03-02 05:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589136', 'tblTempVendorCDR_20' ) start [2025-03-02 05:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589136', 'tblTempVendorCDR_20' ) end [2025-03-02 05:57:17] Production.INFO: ProcessCDR(1,14589136,1,1,2) [2025-03-02 05:57:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589136,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:57:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589136,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:57:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589136,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:57:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589136,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:57:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589136', 'tblTempUsageDetail_20' ) start [2025-03-02 05:57:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589136', 'tblTempUsageDetail_20' ) end [2025-03-02 05:57:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:57:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:57:20] Production.INFO: ==10708== Releasing lock... [2025-03-02 05:57:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:57:20] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 05:58:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:58:06 [end_date_ymd] => 2025-03-02 05:58:06 [RateCDR] => 1 ) [2025-03-02 05: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-03-02 02:58:06' and `end` < '2025-03-02 05: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-03-02 05:58:18] Production.INFO: count ==159 [2025-03-02 05:58:18] Production.ERROR: pbx CDR StartTime 2025-03-02 02:58:06 - End Time 2025-03-02 05:58:06 [2025-03-02 05:58:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589141', 'tblTempUsageDetail_20' ) start [2025-03-02 05:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589141', 'tblTempUsageDetail_20' ) end [2025-03-02 05:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589141', 'tblTempVendorCDR_20' ) start [2025-03-02 05:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589141', 'tblTempVendorCDR_20' ) end [2025-03-02 05:58:18] Production.INFO: ProcessCDR(1,14589141,1,1,2) [2025-03-02 05:58:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589141,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:58:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589141,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:58:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589141,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:58:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589141,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:58:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589141', 'tblTempUsageDetail_20' ) start [2025-03-02 05:58:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589141', 'tblTempUsageDetail_20' ) end [2025-03-02 05:58:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:58:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:58:21] Production.INFO: ==10789== Releasing lock... [2025-03-02 05:58:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:58:21] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 05:59:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 02:59:05 [end_date_ymd] => 2025-03-02 05:59:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 02:59:05' and `end` < '2025-03-02 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-03-02 05:59:17] Production.INFO: count ==159 [2025-03-02 05:59:17] Production.ERROR: pbx CDR StartTime 2025-03-02 02:59:05 - End Time 2025-03-02 05:59:05 [2025-03-02 05:59:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 05:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589146', 'tblTempUsageDetail_20' ) start [2025-03-02 05:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589146', 'tblTempUsageDetail_20' ) end [2025-03-02 05:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589146', 'tblTempVendorCDR_20' ) start [2025-03-02 05:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589146', 'tblTempVendorCDR_20' ) end [2025-03-02 05:59:17] Production.INFO: ProcessCDR(1,14589146,1,1,2) [2025-03-02 05:59:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589146,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:59:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589146,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 05:59:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589146,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:59:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589146,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 05:59:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589146', 'tblTempUsageDetail_20' ) start [2025-03-02 05:59:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589146', 'tblTempUsageDetail_20' ) end [2025-03-02 05:59:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 05:59:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 05:59:20] Production.INFO: ==10869== Releasing lock... [2025-03-02 05:59:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 05:59:20] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 06:00:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:00:06 [end_date_ymd] => 2025-03-02 06:00:06 [RateCDR] => 1 ) [2025-03-02 06: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-03-02 03:00:06' and `end` < '2025-03-02 06: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-03-02 06:00:18] Production.INFO: count ==154 [2025-03-02 06:00:18] Production.ERROR: pbx CDR StartTime 2025-03-02 03:00:06 - End Time 2025-03-02 06:00:06 [2025-03-02 06:00:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589152', 'tblTempUsageDetail_20' ) start [2025-03-02 06:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589152', 'tblTempUsageDetail_20' ) end [2025-03-02 06:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589152', 'tblTempVendorCDR_20' ) start [2025-03-02 06:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589152', 'tblTempVendorCDR_20' ) end [2025-03-02 06:00:18] Production.INFO: ProcessCDR(1,14589152,1,1,2) [2025-03-02 06:00:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589152,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:00:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589152,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:00:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589152,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:00:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589152,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:00:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589152', 'tblTempUsageDetail_20' ) start [2025-03-02 06:00:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589152', 'tblTempUsageDetail_20' ) end [2025-03-02 06:00:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:00:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:00:21] Production.INFO: ==10959== Releasing lock... [2025-03-02 06:00:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:00:21] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 06:01:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:01:05 [end_date_ymd] => 2025-03-02 06:01:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:01:05' and `end` < '2025-03-02 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-03-02 06:01:17] Production.INFO: count ==158 [2025-03-02 06:01:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:01:05 - End Time 2025-03-02 06:01:05 [2025-03-02 06:01:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589157', 'tblTempUsageDetail_20' ) start [2025-03-02 06:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589157', 'tblTempUsageDetail_20' ) end [2025-03-02 06:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589157', 'tblTempVendorCDR_20' ) start [2025-03-02 06:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589157', 'tblTempVendorCDR_20' ) end [2025-03-02 06:01:17] Production.INFO: ProcessCDR(1,14589157,1,1,2) [2025-03-02 06:01:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589157,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:01:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589157,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:01:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589157,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:01:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589157,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589157', 'tblTempUsageDetail_20' ) start [2025-03-02 06:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589157', 'tblTempUsageDetail_20' ) end [2025-03-02 06:01:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:01:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:01:21] Production.INFO: ==11065== Releasing lock... [2025-03-02 06:01:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:01:21] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 06:02:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:02:06 [end_date_ymd] => 2025-03-02 06:02:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:02:06' and `end` < '2025-03-02 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-03-02 06:02:18] Production.INFO: count ==155 [2025-03-02 06:02:18] Production.ERROR: pbx CDR StartTime 2025-03-02 03:02:06 - End Time 2025-03-02 06:02:06 [2025-03-02 06:02:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589162', 'tblTempUsageDetail_20' ) start [2025-03-02 06:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589162', 'tblTempUsageDetail_20' ) end [2025-03-02 06:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589162', 'tblTempVendorCDR_20' ) start [2025-03-02 06:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589162', 'tblTempVendorCDR_20' ) end [2025-03-02 06:02:18] Production.INFO: ProcessCDR(1,14589162,1,1,2) [2025-03-02 06:02:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589162,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:02:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589162,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:02:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589162,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:02:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589162,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:02:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589162', 'tblTempUsageDetail_20' ) start [2025-03-02 06:02:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589162', 'tblTempUsageDetail_20' ) end [2025-03-02 06:02:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:02:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:02:21] Production.INFO: ==11146== Releasing lock... [2025-03-02 06:02:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:02:21] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 06:03:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:03:05 [end_date_ymd] => 2025-03-02 06:03:05 [RateCDR] => 1 ) [2025-03-02 06: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-03-02 03:03:05' and `end` < '2025-03-02 06: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-03-02 06:03:17] Production.INFO: count ==154 [2025-03-02 06:03:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:03:05 - End Time 2025-03-02 06:03:05 [2025-03-02 06:03:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589167', 'tblTempUsageDetail_20' ) start [2025-03-02 06:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589167', 'tblTempUsageDetail_20' ) end [2025-03-02 06:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589167', 'tblTempVendorCDR_20' ) start [2025-03-02 06:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589167', 'tblTempVendorCDR_20' ) end [2025-03-02 06:03:17] Production.INFO: ProcessCDR(1,14589167,1,1,2) [2025-03-02 06:03:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589167,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:03:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589167,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:03:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589167,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:03:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589167,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:03:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589167', 'tblTempUsageDetail_20' ) start [2025-03-02 06:03:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589167', 'tblTempUsageDetail_20' ) end [2025-03-02 06:03:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:03:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:03:20] Production.INFO: ==11230== Releasing lock... [2025-03-02 06:03:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:03:20] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 06:04:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:04:05 [end_date_ymd] => 2025-03-02 06:04:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:04:05' and `end` < '2025-03-02 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-03-02 06:04:17] Production.INFO: count ==154 [2025-03-02 06:04:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:04:05 - End Time 2025-03-02 06:04:05 [2025-03-02 06:04:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589172', 'tblTempUsageDetail_20' ) start [2025-03-02 06:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589172', 'tblTempUsageDetail_20' ) end [2025-03-02 06:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589172', 'tblTempVendorCDR_20' ) start [2025-03-02 06:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589172', 'tblTempVendorCDR_20' ) end [2025-03-02 06:04:17] Production.INFO: ProcessCDR(1,14589172,1,1,2) [2025-03-02 06:04:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589172,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:04:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589172,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:04:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589172,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:04:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589172,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:04:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589172', 'tblTempUsageDetail_20' ) start [2025-03-02 06:04:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589172', 'tblTempUsageDetail_20' ) end [2025-03-02 06:04:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:04:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:04:20] Production.INFO: ==11310== Releasing lock... [2025-03-02 06:04:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:04:20] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 06:05:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:05:05 [end_date_ymd] => 2025-03-02 06:05:05 [RateCDR] => 1 ) [2025-03-02 06: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-03-02 03:05:05' and `end` < '2025-03-02 06: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-03-02 06:05:17] Production.INFO: count ==154 [2025-03-02 06:05:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:05:05 - End Time 2025-03-02 06:05:05 [2025-03-02 06:05:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589177', 'tblTempUsageDetail_20' ) start [2025-03-02 06:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589177', 'tblTempUsageDetail_20' ) end [2025-03-02 06:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589177', 'tblTempVendorCDR_20' ) start [2025-03-02 06:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589177', 'tblTempVendorCDR_20' ) end [2025-03-02 06:05:17] Production.INFO: ProcessCDR(1,14589177,1,1,2) [2025-03-02 06:05:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589177,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:05:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589177,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:05:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589177,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:05:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589177,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:05:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589177', 'tblTempUsageDetail_20' ) start [2025-03-02 06:05:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589177', 'tblTempUsageDetail_20' ) end [2025-03-02 06:05:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:05:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:05:20] Production.INFO: ==11427== Releasing lock... [2025-03-02 06:05:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:05:20] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 06:06:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:06:05 [end_date_ymd] => 2025-03-02 06:06:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:06:05' and `end` < '2025-03-02 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-03-02 06:06:17] Production.INFO: count ==154 [2025-03-02 06:06:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:06:05 - End Time 2025-03-02 06:06:05 [2025-03-02 06:06:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589182', 'tblTempUsageDetail_20' ) start [2025-03-02 06:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589182', 'tblTempUsageDetail_20' ) end [2025-03-02 06:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589182', 'tblTempVendorCDR_20' ) start [2025-03-02 06:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589182', 'tblTempVendorCDR_20' ) end [2025-03-02 06:06:17] Production.INFO: ProcessCDR(1,14589182,1,1,2) [2025-03-02 06:06:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589182,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:06:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589182,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:06:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589182,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:06:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589182,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:06:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589182', 'tblTempUsageDetail_20' ) start [2025-03-02 06:06:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589182', 'tblTempUsageDetail_20' ) end [2025-03-02 06:06:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:06:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:06:21] Production.INFO: ==11507== Releasing lock... [2025-03-02 06:06:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:06:21] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 06:07:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:07:06 [end_date_ymd] => 2025-03-02 06:07:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:07:06' and `end` < '2025-03-02 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-03-02 06:07:18] Production.INFO: count ==154 [2025-03-02 06:07:18] Production.ERROR: pbx CDR StartTime 2025-03-02 03:07:06 - End Time 2025-03-02 06:07:06 [2025-03-02 06:07:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589187', 'tblTempUsageDetail_20' ) start [2025-03-02 06:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589187', 'tblTempUsageDetail_20' ) end [2025-03-02 06:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589187', 'tblTempVendorCDR_20' ) start [2025-03-02 06:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589187', 'tblTempVendorCDR_20' ) end [2025-03-02 06:07:18] Production.INFO: ProcessCDR(1,14589187,1,1,2) [2025-03-02 06:07:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589187,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:07:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589187,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:07:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589187,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:07:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589187,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:07:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589187', 'tblTempUsageDetail_20' ) start [2025-03-02 06:07:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589187', 'tblTempUsageDetail_20' ) end [2025-03-02 06:07:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:07:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:07:21] Production.INFO: ==11591== Releasing lock... [2025-03-02 06:07:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:07:21] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 06:08:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:08:05 [end_date_ymd] => 2025-03-02 06:08:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:08:05' and `end` < '2025-03-02 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-03-02 06:08:17] Production.INFO: count ==153 [2025-03-02 06:08:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:08:05 - End Time 2025-03-02 06:08:05 [2025-03-02 06:08:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589192', 'tblTempUsageDetail_20' ) start [2025-03-02 06:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589192', 'tblTempUsageDetail_20' ) end [2025-03-02 06:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589192', 'tblTempVendorCDR_20' ) start [2025-03-02 06:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589192', 'tblTempVendorCDR_20' ) end [2025-03-02 06:08:17] Production.INFO: ProcessCDR(1,14589192,1,1,2) [2025-03-02 06:08:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589192,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:08:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589192,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:08:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589192,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:08:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589192,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:08:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589192', 'tblTempUsageDetail_20' ) start [2025-03-02 06:08:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589192', 'tblTempUsageDetail_20' ) end [2025-03-02 06:08:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:08:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:08:21] Production.INFO: ==11678== Releasing lock... [2025-03-02 06:08:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:08:21] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 06:09:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:09:05 [end_date_ymd] => 2025-03-02 06:09:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:09:05' and `end` < '2025-03-02 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-03-02 06:09:17] Production.INFO: count ==153 [2025-03-02 06:09:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:09:05 - End Time 2025-03-02 06:09:05 [2025-03-02 06:09:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589197', 'tblTempUsageDetail_20' ) start [2025-03-02 06:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589197', 'tblTempUsageDetail_20' ) end [2025-03-02 06:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589197', 'tblTempVendorCDR_20' ) start [2025-03-02 06:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589197', 'tblTempVendorCDR_20' ) end [2025-03-02 06:09:17] Production.INFO: ProcessCDR(1,14589197,1,1,2) [2025-03-02 06:09:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589197,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:09:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589197,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:09:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589197,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:09:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589197,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:09:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589197', 'tblTempUsageDetail_20' ) start [2025-03-02 06:09:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589197', 'tblTempUsageDetail_20' ) end [2025-03-02 06:09:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:09:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:09:20] Production.INFO: ==11760== Releasing lock... [2025-03-02 06:09:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:09:20] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 06:10:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:10:06 [end_date_ymd] => 2025-03-02 06:10:06 [RateCDR] => 1 ) [2025-03-02 06: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-03-02 03:10:06' and `end` < '2025-03-02 06: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-03-02 06:10:18] Production.INFO: count ==151 [2025-03-02 06:10:18] Production.ERROR: pbx CDR StartTime 2025-03-02 03:10:06 - End Time 2025-03-02 06:10:06 [2025-03-02 06:10:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589203', 'tblTempUsageDetail_20' ) start [2025-03-02 06:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589203', 'tblTempUsageDetail_20' ) end [2025-03-02 06:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589203', 'tblTempVendorCDR_20' ) start [2025-03-02 06:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589203', 'tblTempVendorCDR_20' ) end [2025-03-02 06:10:18] Production.INFO: ProcessCDR(1,14589203,1,1,2) [2025-03-02 06:10:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589203,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:10:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589203,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:10:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589203,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:10:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589203,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:10:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589203', 'tblTempUsageDetail_20' ) start [2025-03-02 06:10:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589203', 'tblTempUsageDetail_20' ) end [2025-03-02 06:10:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:10:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:10:21] Production.INFO: ==11846== Releasing lock... [2025-03-02 06:10:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:10:21] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 06:11:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:11:05 [end_date_ymd] => 2025-03-02 06:11:05 [RateCDR] => 1 ) [2025-03-02 06: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-03-02 03:11:05' and `end` < '2025-03-02 06: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-03-02 06:11:17] Production.INFO: count ==151 [2025-03-02 06:11:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:11:05 - End Time 2025-03-02 06:11:05 [2025-03-02 06:11:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589208', 'tblTempUsageDetail_20' ) start [2025-03-02 06:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589208', 'tblTempUsageDetail_20' ) end [2025-03-02 06:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589208', 'tblTempVendorCDR_20' ) start [2025-03-02 06:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589208', 'tblTempVendorCDR_20' ) end [2025-03-02 06:11:17] Production.INFO: ProcessCDR(1,14589208,1,1,2) [2025-03-02 06:11:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589208,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:11:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589208,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:11:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589208,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:11:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589208,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:11:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589208', 'tblTempUsageDetail_20' ) start [2025-03-02 06:11:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589208', 'tblTempUsageDetail_20' ) end [2025-03-02 06:11:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:11:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:11:21] Production.INFO: ==11921== Releasing lock... [2025-03-02 06:11:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:11:21] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 06:12:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:12:05 [end_date_ymd] => 2025-03-02 06:12:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:12:05' and `end` < '2025-03-02 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-03-02 06:12:17] Production.INFO: count ==151 [2025-03-02 06:12:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:12:05 - End Time 2025-03-02 06:12:05 [2025-03-02 06:12:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589213', 'tblTempUsageDetail_20' ) start [2025-03-02 06:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589213', 'tblTempUsageDetail_20' ) end [2025-03-02 06:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589213', 'tblTempVendorCDR_20' ) start [2025-03-02 06:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589213', 'tblTempVendorCDR_20' ) end [2025-03-02 06:12:17] Production.INFO: ProcessCDR(1,14589213,1,1,2) [2025-03-02 06:12:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589213,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:12:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589213,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:12:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589213,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:12:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589213,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:12:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589213', 'tblTempUsageDetail_20' ) start [2025-03-02 06:12:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589213', 'tblTempUsageDetail_20' ) end [2025-03-02 06:12:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:12:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:12:20] Production.INFO: ==11993== Releasing lock... [2025-03-02 06:12:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:12:20] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 06:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:13:05 [end_date_ymd] => 2025-03-02 06:13:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:13:05' and `end` < '2025-03-02 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-03-02 06:13:17] Production.INFO: count ==151 [2025-03-02 06:13:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:13:05 - End Time 2025-03-02 06:13:05 [2025-03-02 06:13:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589218', 'tblTempUsageDetail_20' ) start [2025-03-02 06:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589218', 'tblTempUsageDetail_20' ) end [2025-03-02 06:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589218', 'tblTempVendorCDR_20' ) start [2025-03-02 06:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589218', 'tblTempVendorCDR_20' ) end [2025-03-02 06:13:17] Production.INFO: ProcessCDR(1,14589218,1,1,2) [2025-03-02 06:13:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589218,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:13:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589218,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:13:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589218,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:13:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589218,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:13:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589218', 'tblTempUsageDetail_20' ) start [2025-03-02 06:13:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589218', 'tblTempUsageDetail_20' ) end [2025-03-02 06:13:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:13:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:13:20] Production.INFO: ==12070== Releasing lock... [2025-03-02 06:13:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:13:20] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 06:14:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:14:05 [end_date_ymd] => 2025-03-02 06:14:05 [RateCDR] => 1 ) [2025-03-02 06: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-03-02 03:14:05' and `end` < '2025-03-02 06: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-03-02 06:14:17] Production.INFO: count ==151 [2025-03-02 06:14:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:14:05 - End Time 2025-03-02 06:14:05 [2025-03-02 06:14:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589223', 'tblTempUsageDetail_20' ) start [2025-03-02 06:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589223', 'tblTempUsageDetail_20' ) end [2025-03-02 06:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589223', 'tblTempVendorCDR_20' ) start [2025-03-02 06:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589223', 'tblTempVendorCDR_20' ) end [2025-03-02 06:14:17] Production.INFO: ProcessCDR(1,14589223,1,1,2) [2025-03-02 06:14:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589223,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:14:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589223,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:14:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589223,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:14:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589223,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:14:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589223', 'tblTempUsageDetail_20' ) start [2025-03-02 06:14:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589223', 'tblTempUsageDetail_20' ) end [2025-03-02 06:14:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:14:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:14:20] Production.INFO: ==12142== Releasing lock... [2025-03-02 06:14:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:14:20] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 06:15:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:15:05 [end_date_ymd] => 2025-03-02 06:15:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:15:05' and `end` < '2025-03-02 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-03-02 06:15:17] Production.INFO: count ==155 [2025-03-02 06:15:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:15:05 - End Time 2025-03-02 06:15:05 [2025-03-02 06:15:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589228', 'tblTempUsageDetail_20' ) start [2025-03-02 06:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589228', 'tblTempUsageDetail_20' ) end [2025-03-02 06:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589228', 'tblTempVendorCDR_20' ) start [2025-03-02 06:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589228', 'tblTempVendorCDR_20' ) end [2025-03-02 06:15:17] Production.INFO: ProcessCDR(1,14589228,1,1,2) [2025-03-02 06:15:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589228,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:15:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589228,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:15:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589228,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:15:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589228,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:15:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589228', 'tblTempUsageDetail_20' ) start [2025-03-02 06:15:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589228', 'tblTempUsageDetail_20' ) end [2025-03-02 06:15:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:15:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:15:20] Production.INFO: ==12222== Releasing lock... [2025-03-02 06:15:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:15:20] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 06:16:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:16:06 [end_date_ymd] => 2025-03-02 06:16:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:16:06' and `end` < '2025-03-02 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-03-02 06:16:18] Production.INFO: count ==159 [2025-03-02 06:16:18] Production.ERROR: pbx CDR StartTime 2025-03-02 03:16:06 - End Time 2025-03-02 06:16:06 [2025-03-02 06:16:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589233', 'tblTempUsageDetail_20' ) start [2025-03-02 06:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589233', 'tblTempUsageDetail_20' ) end [2025-03-02 06:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589233', 'tblTempVendorCDR_20' ) start [2025-03-02 06:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589233', 'tblTempVendorCDR_20' ) end [2025-03-02 06:16:18] Production.INFO: ProcessCDR(1,14589233,1,1,2) [2025-03-02 06:16:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589233,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:16:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589233,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:16:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589233,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:16:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589233,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589233', 'tblTempUsageDetail_20' ) start [2025-03-02 06:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589233', 'tblTempUsageDetail_20' ) end [2025-03-02 06:16:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:16:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:16:21] Production.INFO: ==12298== Releasing lock... [2025-03-02 06:16:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:16:21] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 06:17:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:17:05 [end_date_ymd] => 2025-03-02 06:17:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:17:05' and `end` < '2025-03-02 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-03-02 06:17:17] Production.INFO: count ==159 [2025-03-02 06:17:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:17:05 - End Time 2025-03-02 06:17:05 [2025-03-02 06:17:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589238', 'tblTempUsageDetail_20' ) start [2025-03-02 06:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589238', 'tblTempUsageDetail_20' ) end [2025-03-02 06:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589238', 'tblTempVendorCDR_20' ) start [2025-03-02 06:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589238', 'tblTempVendorCDR_20' ) end [2025-03-02 06:17:17] Production.INFO: ProcessCDR(1,14589238,1,1,2) [2025-03-02 06:17:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589238,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:17:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589238,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:17:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589238,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:17:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589238,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589238', 'tblTempUsageDetail_20' ) start [2025-03-02 06:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589238', 'tblTempUsageDetail_20' ) end [2025-03-02 06:17:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:17:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:17:21] Production.INFO: ==12377== Releasing lock... [2025-03-02 06:17:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:17:21] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 06:18:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:18:05 [end_date_ymd] => 2025-03-02 06:18:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:18:05' and `end` < '2025-03-02 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-03-02 06:18:17] Production.INFO: count ==159 [2025-03-02 06:18:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:18:05 - End Time 2025-03-02 06:18:05 [2025-03-02 06:18:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589243', 'tblTempUsageDetail_20' ) start [2025-03-02 06:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589243', 'tblTempUsageDetail_20' ) end [2025-03-02 06:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589243', 'tblTempVendorCDR_20' ) start [2025-03-02 06:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589243', 'tblTempVendorCDR_20' ) end [2025-03-02 06:18:17] Production.INFO: ProcessCDR(1,14589243,1,1,2) [2025-03-02 06:18:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589243,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:18:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589243,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:18:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589243,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:18:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589243,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589243', 'tblTempUsageDetail_20' ) start [2025-03-02 06:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589243', 'tblTempUsageDetail_20' ) end [2025-03-02 06:18:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:18:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:18:21] Production.INFO: ==12456== Releasing lock... [2025-03-02 06:18:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:18:21] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 06:19:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:19:05 [end_date_ymd] => 2025-03-02 06:19:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:19:05' and `end` < '2025-03-02 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-03-02 06:19:17] Production.INFO: count ==160 [2025-03-02 06:19:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:19:05 - End Time 2025-03-02 06:19:05 [2025-03-02 06:19:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589248', 'tblTempUsageDetail_20' ) start [2025-03-02 06:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589248', 'tblTempUsageDetail_20' ) end [2025-03-02 06:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589248', 'tblTempVendorCDR_20' ) start [2025-03-02 06:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589248', 'tblTempVendorCDR_20' ) end [2025-03-02 06:19:17] Production.INFO: ProcessCDR(1,14589248,1,1,2) [2025-03-02 06:19:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589248,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:19:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589248,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:19:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589248,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:19:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589248,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:19:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589248', 'tblTempUsageDetail_20' ) start [2025-03-02 06:19:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589248', 'tblTempUsageDetail_20' ) end [2025-03-02 06:19:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:19:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:19:20] Production.INFO: ==12543== Releasing lock... [2025-03-02 06:19:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:19:20] Production.INFO: 28.75 MB #Memory Used# [2025-03-02 06:20:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:20:06 [end_date_ymd] => 2025-03-02 06:20:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:20:06' and `end` < '2025-03-02 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-03-02 06:20:18] Production.INFO: count ==163 [2025-03-02 06:20:18] Production.ERROR: pbx CDR StartTime 2025-03-02 03:20:06 - End Time 2025-03-02 06:20:06 [2025-03-02 06:20:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589254', 'tblTempUsageDetail_20' ) start [2025-03-02 06:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589254', 'tblTempUsageDetail_20' ) end [2025-03-02 06:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589254', 'tblTempVendorCDR_20' ) start [2025-03-02 06:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589254', 'tblTempVendorCDR_20' ) end [2025-03-02 06:20:18] Production.INFO: ProcessCDR(1,14589254,1,1,2) [2025-03-02 06:20:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589254,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:20:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589254,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:20:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589254,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:20:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589254,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589254', 'tblTempUsageDetail_20' ) start [2025-03-02 06:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589254', 'tblTempUsageDetail_20' ) end [2025-03-02 06:20:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:20:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:20:22] Production.INFO: ==12657== Releasing lock... [2025-03-02 06:20:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:20:22] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:21:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:21:05 [end_date_ymd] => 2025-03-02 06:21:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:21:05' and `end` < '2025-03-02 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-03-02 06:21:17] Production.INFO: count ==163 [2025-03-02 06:21:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:21:05 - End Time 2025-03-02 06:21:05 [2025-03-02 06:21:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589259', 'tblTempUsageDetail_20' ) start [2025-03-02 06:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589259', 'tblTempUsageDetail_20' ) end [2025-03-02 06:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589259', 'tblTempVendorCDR_20' ) start [2025-03-02 06:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589259', 'tblTempVendorCDR_20' ) end [2025-03-02 06:21:17] Production.INFO: ProcessCDR(1,14589259,1,1,2) [2025-03-02 06:21:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589259,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:21:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589259,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:21:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589259,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:21:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589259,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:21:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589259', 'tblTempUsageDetail_20' ) start [2025-03-02 06:21:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589259', 'tblTempUsageDetail_20' ) end [2025-03-02 06:21:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:21:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:21:21] Production.INFO: ==12736== Releasing lock... [2025-03-02 06:21:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:21:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:22:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:22:06 [end_date_ymd] => 2025-03-02 06:22:06 [RateCDR] => 1 ) [2025-03-02 06: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-03-02 03:22:06' and `end` < '2025-03-02 06: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-03-02 06:22:18] Production.INFO: count ==163 [2025-03-02 06:22:18] Production.ERROR: pbx CDR StartTime 2025-03-02 03:22:06 - End Time 2025-03-02 06:22:06 [2025-03-02 06:22:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589264', 'tblTempUsageDetail_20' ) start [2025-03-02 06:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589264', 'tblTempUsageDetail_20' ) end [2025-03-02 06:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589264', 'tblTempVendorCDR_20' ) start [2025-03-02 06:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589264', 'tblTempVendorCDR_20' ) end [2025-03-02 06:22:18] Production.INFO: ProcessCDR(1,14589264,1,1,2) [2025-03-02 06:22:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589264,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:22:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589264,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:22:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589264,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:22:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589264,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:22:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589264', 'tblTempUsageDetail_20' ) start [2025-03-02 06:22:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589264', 'tblTempUsageDetail_20' ) end [2025-03-02 06:22:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:22:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:22:22] Production.INFO: ==12812== Releasing lock... [2025-03-02 06:22:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:22:22] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:23:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:23:05 [end_date_ymd] => 2025-03-02 06:23:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:23:05' and `end` < '2025-03-02 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-03-02 06:23:17] Production.INFO: count ==163 [2025-03-02 06:23:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:23:05 - End Time 2025-03-02 06:23:05 [2025-03-02 06:23:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589269', 'tblTempUsageDetail_20' ) start [2025-03-02 06:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589269', 'tblTempUsageDetail_20' ) end [2025-03-02 06:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589269', 'tblTempVendorCDR_20' ) start [2025-03-02 06:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589269', 'tblTempVendorCDR_20' ) end [2025-03-02 06:23:17] Production.INFO: ProcessCDR(1,14589269,1,1,2) [2025-03-02 06:23:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589269,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:23:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589269,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:23:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589269,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:23:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589269,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:23:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589269', 'tblTempUsageDetail_20' ) start [2025-03-02 06:23:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589269', 'tblTempUsageDetail_20' ) end [2025-03-02 06:23:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:23:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:23:20] Production.INFO: ==12886== Releasing lock... [2025-03-02 06:23:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:23:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:24:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:24:06 [end_date_ymd] => 2025-03-02 06:24:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:24:06' and `end` < '2025-03-02 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-03-02 06:24:18] Production.INFO: count ==163 [2025-03-02 06:24:18] Production.ERROR: pbx CDR StartTime 2025-03-02 03:24:06 - End Time 2025-03-02 06:24:06 [2025-03-02 06:24:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589274', 'tblTempUsageDetail_20' ) start [2025-03-02 06:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589274', 'tblTempUsageDetail_20' ) end [2025-03-02 06:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589274', 'tblTempVendorCDR_20' ) start [2025-03-02 06:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589274', 'tblTempVendorCDR_20' ) end [2025-03-02 06:24:18] Production.INFO: ProcessCDR(1,14589274,1,1,2) [2025-03-02 06:24:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589274,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:24:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589274,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:24:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589274,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:24:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589274,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:24:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589274', 'tblTempUsageDetail_20' ) start [2025-03-02 06:24:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589274', 'tblTempUsageDetail_20' ) end [2025-03-02 06:24:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:24:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:24:22] Production.INFO: ==12957== Releasing lock... [2025-03-02 06:24:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:24:22] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:25:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:25:05 [end_date_ymd] => 2025-03-02 06:25:05 [RateCDR] => 1 ) [2025-03-02 06: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-03-02 03:25:05' and `end` < '2025-03-02 06: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-03-02 06:25:17] Production.INFO: count ==163 [2025-03-02 06:25:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:25:05 - End Time 2025-03-02 06:25:05 [2025-03-02 06:25:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589279', 'tblTempUsageDetail_20' ) start [2025-03-02 06:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589279', 'tblTempUsageDetail_20' ) end [2025-03-02 06:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589279', 'tblTempVendorCDR_20' ) start [2025-03-02 06:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589279', 'tblTempVendorCDR_20' ) end [2025-03-02 06:25:17] Production.INFO: ProcessCDR(1,14589279,1,1,2) [2025-03-02 06:25:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589279,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:25:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589279,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:25:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589279,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:25:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589279,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589279', 'tblTempUsageDetail_20' ) start [2025-03-02 06:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589279', 'tblTempUsageDetail_20' ) end [2025-03-02 06:25:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:25:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:25:21] Production.INFO: ==13026== Releasing lock... [2025-03-02 06:25:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:25:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:26:05 [end_date_ymd] => 2025-03-02 06:26:05 [RateCDR] => 1 ) [2025-03-02 06: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-03-02 03:26:05' and `end` < '2025-03-02 06: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-03-02 06:26:17] Production.INFO: count ==171 [2025-03-02 06:26:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:26:05 - End Time 2025-03-02 06:26:05 [2025-03-02 06:26:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589284', 'tblTempUsageDetail_20' ) start [2025-03-02 06:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589284', 'tblTempUsageDetail_20' ) end [2025-03-02 06:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589284', 'tblTempVendorCDR_20' ) start [2025-03-02 06:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589284', 'tblTempVendorCDR_20' ) end [2025-03-02 06:26:17] Production.INFO: ProcessCDR(1,14589284,1,1,2) [2025-03-02 06:26:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589284,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:26:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589284,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:26:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589284,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:26:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589284,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:26:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589284', 'tblTempUsageDetail_20' ) start [2025-03-02 06:26:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589284', 'tblTempUsageDetail_20' ) end [2025-03-02 06:26:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:26:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:26:20] Production.INFO: ==13108== Releasing lock... [2025-03-02 06:26:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:26:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:27:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:27:05 [end_date_ymd] => 2025-03-02 06:27:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:27:05' and `end` < '2025-03-02 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-03-02 06:27:17] Production.INFO: count ==175 [2025-03-02 06:27:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:27:05 - End Time 2025-03-02 06:27:05 [2025-03-02 06:27:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589289', 'tblTempUsageDetail_20' ) start [2025-03-02 06:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589289', 'tblTempUsageDetail_20' ) end [2025-03-02 06:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589289', 'tblTempVendorCDR_20' ) start [2025-03-02 06:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589289', 'tblTempVendorCDR_20' ) end [2025-03-02 06:27:17] Production.INFO: ProcessCDR(1,14589289,1,1,2) [2025-03-02 06:27:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589289,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:27:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589289,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:27:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589289,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:27:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589289,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:27:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589289', 'tblTempUsageDetail_20' ) start [2025-03-02 06:27:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589289', 'tblTempUsageDetail_20' ) end [2025-03-02 06:27:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:27:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:27:20] Production.INFO: ==13181== Releasing lock... [2025-03-02 06:27:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:27:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:28:05 [end_date_ymd] => 2025-03-02 06:28:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:28:05' and `end` < '2025-03-02 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-03-02 06:28:17] Production.INFO: count ==175 [2025-03-02 06:28:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:28:05 - End Time 2025-03-02 06:28:05 [2025-03-02 06:28:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589294', 'tblTempUsageDetail_20' ) start [2025-03-02 06:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589294', 'tblTempUsageDetail_20' ) end [2025-03-02 06:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589294', 'tblTempVendorCDR_20' ) start [2025-03-02 06:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589294', 'tblTempVendorCDR_20' ) end [2025-03-02 06:28:17] Production.INFO: ProcessCDR(1,14589294,1,1,2) [2025-03-02 06:28:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589294,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:28:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589294,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:28:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589294,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:28:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589294,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:28:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589294', 'tblTempUsageDetail_20' ) start [2025-03-02 06:28:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589294', 'tblTempUsageDetail_20' ) end [2025-03-02 06:28:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:28:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:28:20] Production.INFO: ==13253== Releasing lock... [2025-03-02 06:28:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:28:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:29:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:29:06 [end_date_ymd] => 2025-03-02 06:29:06 [RateCDR] => 1 ) [2025-03-02 06: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-03-02 03:29:06' and `end` < '2025-03-02 06: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-03-02 06:29:18] Production.INFO: count ==175 [2025-03-02 06:29:18] Production.ERROR: pbx CDR StartTime 2025-03-02 03:29:06 - End Time 2025-03-02 06:29:06 [2025-03-02 06:29:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589299', 'tblTempUsageDetail_20' ) start [2025-03-02 06:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589299', 'tblTempUsageDetail_20' ) end [2025-03-02 06:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589299', 'tblTempVendorCDR_20' ) start [2025-03-02 06:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589299', 'tblTempVendorCDR_20' ) end [2025-03-02 06:29:18] Production.INFO: ProcessCDR(1,14589299,1,1,2) [2025-03-02 06:29:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589299,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:29:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589299,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:29:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589299,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:29:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589299,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:29:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589299', 'tblTempUsageDetail_20' ) start [2025-03-02 06:29:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589299', 'tblTempUsageDetail_20' ) end [2025-03-02 06:29:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:29:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:29:21] Production.INFO: ==13333== Releasing lock... [2025-03-02 06:29:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:29:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:30:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:30:05 [end_date_ymd] => 2025-03-02 06:30:05 [RateCDR] => 1 ) [2025-03-02 06: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-03-02 03:30:05' and `end` < '2025-03-02 06: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-03-02 06:30:17] Production.INFO: count ==173 [2025-03-02 06:30:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:30:05 - End Time 2025-03-02 06:30:05 [2025-03-02 06:30:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589304', 'tblTempUsageDetail_20' ) start [2025-03-02 06:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589304', 'tblTempUsageDetail_20' ) end [2025-03-02 06:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589304', 'tblTempVendorCDR_20' ) start [2025-03-02 06:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589304', 'tblTempVendorCDR_20' ) end [2025-03-02 06:30:17] Production.INFO: ProcessCDR(1,14589304,1,1,2) [2025-03-02 06:30:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589304,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:30:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589304,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:30:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589304,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:30:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589304,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:30:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589304', 'tblTempUsageDetail_20' ) start [2025-03-02 06:30:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589304', 'tblTempUsageDetail_20' ) end [2025-03-02 06:30:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:30:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:30:21] Production.INFO: ==13411== Releasing lock... [2025-03-02 06:30:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:30:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:31:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:31:06 [end_date_ymd] => 2025-03-02 06:31:06 [RateCDR] => 1 ) [2025-03-02 06: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-03-02 03:31:06' and `end` < '2025-03-02 06: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-03-02 06:31:18] Production.INFO: count ==171 [2025-03-02 06:31:18] Production.ERROR: pbx CDR StartTime 2025-03-02 03:31:06 - End Time 2025-03-02 06:31:06 [2025-03-02 06:31:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589310', 'tblTempUsageDetail_20' ) start [2025-03-02 06:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589310', 'tblTempUsageDetail_20' ) end [2025-03-02 06:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589310', 'tblTempVendorCDR_20' ) start [2025-03-02 06:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589310', 'tblTempVendorCDR_20' ) end [2025-03-02 06:31:18] Production.INFO: ProcessCDR(1,14589310,1,1,2) [2025-03-02 06:31:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589310,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:31:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589310,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:31:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589310,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:31:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589310,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:31:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589310', 'tblTempUsageDetail_20' ) start [2025-03-02 06:31:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589310', 'tblTempUsageDetail_20' ) end [2025-03-02 06:31:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:31:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:31:21] Production.INFO: ==13497== Releasing lock... [2025-03-02 06:31:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:31:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:32:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:32:05 [end_date_ymd] => 2025-03-02 06:32:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:32:05' and `end` < '2025-03-02 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-03-02 06:32:17] Production.INFO: count ==171 [2025-03-02 06:32:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:32:05 - End Time 2025-03-02 06:32:05 [2025-03-02 06:32:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589315', 'tblTempUsageDetail_20' ) start [2025-03-02 06:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589315', 'tblTempUsageDetail_20' ) end [2025-03-02 06:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589315', 'tblTempVendorCDR_20' ) start [2025-03-02 06:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589315', 'tblTempVendorCDR_20' ) end [2025-03-02 06:32:17] Production.INFO: ProcessCDR(1,14589315,1,1,2) [2025-03-02 06:32:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589315,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:32:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589315,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:32:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589315,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:32:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589315,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:32:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589315', 'tblTempUsageDetail_20' ) start [2025-03-02 06:32:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589315', 'tblTempUsageDetail_20' ) end [2025-03-02 06:32:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:32:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:32:20] Production.INFO: ==13583== Releasing lock... [2025-03-02 06:32:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:32:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:33:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:33:05 [end_date_ymd] => 2025-03-02 06:33:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:33:05' and `end` < '2025-03-02 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-03-02 06:33:17] Production.INFO: count ==171 [2025-03-02 06:33:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:33:05 - End Time 2025-03-02 06:33:05 [2025-03-02 06:33:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589320', 'tblTempUsageDetail_20' ) start [2025-03-02 06:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589320', 'tblTempUsageDetail_20' ) end [2025-03-02 06:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589320', 'tblTempVendorCDR_20' ) start [2025-03-02 06:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589320', 'tblTempVendorCDR_20' ) end [2025-03-02 06:33:17] Production.INFO: ProcessCDR(1,14589320,1,1,2) [2025-03-02 06:33:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589320,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:33:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589320,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:33:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589320,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:33:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589320,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:33:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589320', 'tblTempUsageDetail_20' ) start [2025-03-02 06:33:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589320', 'tblTempUsageDetail_20' ) end [2025-03-02 06:33:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:33:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:33:21] Production.INFO: ==13665== Releasing lock... [2025-03-02 06:33:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:33:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:34:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:34:05 [end_date_ymd] => 2025-03-02 06:34:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:34:05' and `end` < '2025-03-02 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-03-02 06:34:17] Production.INFO: count ==171 [2025-03-02 06:34:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:34:05 - End Time 2025-03-02 06:34:05 [2025-03-02 06:34:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589325', 'tblTempUsageDetail_20' ) start [2025-03-02 06:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589325', 'tblTempUsageDetail_20' ) end [2025-03-02 06:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589325', 'tblTempVendorCDR_20' ) start [2025-03-02 06:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589325', 'tblTempVendorCDR_20' ) end [2025-03-02 06:34:17] Production.INFO: ProcessCDR(1,14589325,1,1,2) [2025-03-02 06:34:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589325,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:34:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589325,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:34:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589325,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:34:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589325,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:34:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589325', 'tblTempUsageDetail_20' ) start [2025-03-02 06:34:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589325', 'tblTempUsageDetail_20' ) end [2025-03-02 06:34:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:34:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:34:20] Production.INFO: ==13739== Releasing lock... [2025-03-02 06:34:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:34:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:35:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:35:05 [end_date_ymd] => 2025-03-02 06:35:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:35:05' and `end` < '2025-03-02 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-03-02 06:35:17] Production.INFO: count ==171 [2025-03-02 06:35:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:35:05 - End Time 2025-03-02 06:35:05 [2025-03-02 06:35:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589330', 'tblTempUsageDetail_20' ) start [2025-03-02 06:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589330', 'tblTempUsageDetail_20' ) end [2025-03-02 06:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589330', 'tblTempVendorCDR_20' ) start [2025-03-02 06:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589330', 'tblTempVendorCDR_20' ) end [2025-03-02 06:35:17] Production.INFO: ProcessCDR(1,14589330,1,1,2) [2025-03-02 06:35:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589330,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:35:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589330,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:35:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589330,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:35:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589330,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:35:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589330', 'tblTempUsageDetail_20' ) start [2025-03-02 06:35:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589330', 'tblTempUsageDetail_20' ) end [2025-03-02 06:35:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:35:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:35:20] Production.INFO: ==13852== Releasing lock... [2025-03-02 06:35:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:35:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:36:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:36:05 [end_date_ymd] => 2025-03-02 06:36:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:36:05' and `end` < '2025-03-02 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-03-02 06:36:17] Production.INFO: count ==171 [2025-03-02 06:36:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:36:05 - End Time 2025-03-02 06:36:05 [2025-03-02 06:36:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589335', 'tblTempUsageDetail_20' ) start [2025-03-02 06:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589335', 'tblTempUsageDetail_20' ) end [2025-03-02 06:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589335', 'tblTempVendorCDR_20' ) start [2025-03-02 06:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589335', 'tblTempVendorCDR_20' ) end [2025-03-02 06:36:17] Production.INFO: ProcessCDR(1,14589335,1,1,2) [2025-03-02 06:36:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589335,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:36:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589335,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:36:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589335,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:36:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589335,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:36:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589335', 'tblTempUsageDetail_20' ) start [2025-03-02 06:36:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589335', 'tblTempUsageDetail_20' ) end [2025-03-02 06:36:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:36:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:36:20] Production.INFO: ==13931== Releasing lock... [2025-03-02 06:36:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:36:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:37:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:37:05 [end_date_ymd] => 2025-03-02 06:37:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:37:05' and `end` < '2025-03-02 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-03-02 06:37:17] Production.INFO: count ==171 [2025-03-02 06:37:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:37:05 - End Time 2025-03-02 06:37:05 [2025-03-02 06:37:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589340', 'tblTempUsageDetail_20' ) start [2025-03-02 06:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589340', 'tblTempUsageDetail_20' ) end [2025-03-02 06:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589340', 'tblTempVendorCDR_20' ) start [2025-03-02 06:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589340', 'tblTempVendorCDR_20' ) end [2025-03-02 06:37:17] Production.INFO: ProcessCDR(1,14589340,1,1,2) [2025-03-02 06:37:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589340,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:37:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589340,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:37:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589340,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:37:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589340,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589340', 'tblTempUsageDetail_20' ) start [2025-03-02 06:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589340', 'tblTempUsageDetail_20' ) end [2025-03-02 06:37:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:37:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:37:21] Production.INFO: ==14004== Releasing lock... [2025-03-02 06:37:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:37:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:38:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:38:05 [end_date_ymd] => 2025-03-02 06:38:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:38:05' and `end` < '2025-03-02 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-03-02 06:38:17] Production.INFO: count ==171 [2025-03-02 06:38:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:38:05 - End Time 2025-03-02 06:38:05 [2025-03-02 06:38:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589345', 'tblTempUsageDetail_20' ) start [2025-03-02 06:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589345', 'tblTempUsageDetail_20' ) end [2025-03-02 06:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589345', 'tblTempVendorCDR_20' ) start [2025-03-02 06:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589345', 'tblTempVendorCDR_20' ) end [2025-03-02 06:38:17] Production.INFO: ProcessCDR(1,14589345,1,1,2) [2025-03-02 06:38:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589345,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:38:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589345,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:38:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589345,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:38:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589345,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:38:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589345', 'tblTempUsageDetail_20' ) start [2025-03-02 06:38:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589345', 'tblTempUsageDetail_20' ) end [2025-03-02 06:38:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:38:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:38:20] Production.INFO: ==14088== Releasing lock... [2025-03-02 06:38:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:38:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:39:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:39:05 [end_date_ymd] => 2025-03-02 06:39:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:39:05' and `end` < '2025-03-02 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-03-02 06:39:17] Production.INFO: count ==171 [2025-03-02 06:39:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:39:05 - End Time 2025-03-02 06:39:05 [2025-03-02 06:39:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589350', 'tblTempUsageDetail_20' ) start [2025-03-02 06:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589350', 'tblTempUsageDetail_20' ) end [2025-03-02 06:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589350', 'tblTempVendorCDR_20' ) start [2025-03-02 06:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589350', 'tblTempVendorCDR_20' ) end [2025-03-02 06:39:17] Production.INFO: ProcessCDR(1,14589350,1,1,2) [2025-03-02 06:39:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589350,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:39:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589350,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:39:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589350,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:39:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589350,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:39:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589350', 'tblTempUsageDetail_20' ) start [2025-03-02 06:39:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589350', 'tblTempUsageDetail_20' ) end [2025-03-02 06:39:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:39:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:39:20] Production.INFO: ==14172== Releasing lock... [2025-03-02 06:39:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:39:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:40:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:40:06 [end_date_ymd] => 2025-03-02 06:40:06 [RateCDR] => 1 ) [2025-03-02 06: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-03-02 03:40:06' and `end` < '2025-03-02 06: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-03-02 06:40:18] Production.INFO: count ==165 [2025-03-02 06:40:18] Production.ERROR: pbx CDR StartTime 2025-03-02 03:40:06 - End Time 2025-03-02 06:40:06 [2025-03-02 06:40:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589356', 'tblTempUsageDetail_20' ) start [2025-03-02 06:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589356', 'tblTempUsageDetail_20' ) end [2025-03-02 06:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589356', 'tblTempVendorCDR_20' ) start [2025-03-02 06:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589356', 'tblTempVendorCDR_20' ) end [2025-03-02 06:40:18] Production.INFO: ProcessCDR(1,14589356,1,1,2) [2025-03-02 06:40:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589356,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:40:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589356,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:40:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589356,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:40:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589356,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:40:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589356', 'tblTempUsageDetail_20' ) start [2025-03-02 06:40:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589356', 'tblTempUsageDetail_20' ) end [2025-03-02 06:40:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:40:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:40:21] Production.INFO: ==14247== Releasing lock... [2025-03-02 06:40:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:40:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:41:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:41:05 [end_date_ymd] => 2025-03-02 06:41:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:41:05' and `end` < '2025-03-02 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-03-02 06:41:17] Production.INFO: count ==161 [2025-03-02 06:41:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:41:05 - End Time 2025-03-02 06:41:05 [2025-03-02 06:41:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589361', 'tblTempUsageDetail_20' ) start [2025-03-02 06:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589361', 'tblTempUsageDetail_20' ) end [2025-03-02 06:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589361', 'tblTempVendorCDR_20' ) start [2025-03-02 06:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589361', 'tblTempVendorCDR_20' ) end [2025-03-02 06:41:17] Production.INFO: ProcessCDR(1,14589361,1,1,2) [2025-03-02 06:41:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589361,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:41:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589361,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:41:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589361,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:41:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589361,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:41:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589361', 'tblTempUsageDetail_20' ) start [2025-03-02 06:41:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589361', 'tblTempUsageDetail_20' ) end [2025-03-02 06:41:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:41:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:41:20] Production.INFO: ==14334== Releasing lock... [2025-03-02 06:41:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:41:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:42:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:42:05 [end_date_ymd] => 2025-03-02 06:42:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:42:05' and `end` < '2025-03-02 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-03-02 06:42:17] Production.INFO: count ==160 [2025-03-02 06:42:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:42:05 - End Time 2025-03-02 06:42:05 [2025-03-02 06:42:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589366', 'tblTempUsageDetail_20' ) start [2025-03-02 06:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589366', 'tblTempUsageDetail_20' ) end [2025-03-02 06:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589366', 'tblTempVendorCDR_20' ) start [2025-03-02 06:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589366', 'tblTempVendorCDR_20' ) end [2025-03-02 06:42:17] Production.INFO: ProcessCDR(1,14589366,1,1,2) [2025-03-02 06:42:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589366,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:42:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589366,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:42:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589366,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:42:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589366,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:42:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589366', 'tblTempUsageDetail_20' ) start [2025-03-02 06:42:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589366', 'tblTempUsageDetail_20' ) end [2025-03-02 06:42:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:42:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:42:21] Production.INFO: ==14415== Releasing lock... [2025-03-02 06:42:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:42:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:43:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:43:05 [end_date_ymd] => 2025-03-02 06:43:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:43:05' and `end` < '2025-03-02 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-03-02 06:43:17] Production.INFO: count ==160 [2025-03-02 06:43:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:43:05 - End Time 2025-03-02 06:43:05 [2025-03-02 06:43:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589371', 'tblTempUsageDetail_20' ) start [2025-03-02 06:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589371', 'tblTempUsageDetail_20' ) end [2025-03-02 06:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589371', 'tblTempVendorCDR_20' ) start [2025-03-02 06:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589371', 'tblTempVendorCDR_20' ) end [2025-03-02 06:43:17] Production.INFO: ProcessCDR(1,14589371,1,1,2) [2025-03-02 06:43:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589371,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:43:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589371,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:43:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589371,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:43:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589371,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:43:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589371', 'tblTempUsageDetail_20' ) start [2025-03-02 06:43:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589371', 'tblTempUsageDetail_20' ) end [2025-03-02 06:43:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:43:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:43:20] Production.INFO: ==14486== Releasing lock... [2025-03-02 06:43:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:43:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:44:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:44:06 [end_date_ymd] => 2025-03-02 06:44:06 [RateCDR] => 1 ) [2025-03-02 06: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-03-02 03:44:06' and `end` < '2025-03-02 06: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-03-02 06:44:17] Production.INFO: count ==160 [2025-03-02 06:44:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:44:06 - End Time 2025-03-02 06:44:06 [2025-03-02 06:44:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589376', 'tblTempUsageDetail_20' ) start [2025-03-02 06:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589376', 'tblTempUsageDetail_20' ) end [2025-03-02 06:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589376', 'tblTempVendorCDR_20' ) start [2025-03-02 06:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589376', 'tblTempVendorCDR_20' ) end [2025-03-02 06:44:18] Production.INFO: ProcessCDR(1,14589376,1,1,2) [2025-03-02 06:44:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589376,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:44:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589376,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:44:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589376,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:44:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589376,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589376', 'tblTempUsageDetail_20' ) start [2025-03-02 06:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589376', 'tblTempUsageDetail_20' ) end [2025-03-02 06:44:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:44:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:44:21] Production.INFO: ==14568== Releasing lock... [2025-03-02 06:44:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:44:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:45:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:45:05 [end_date_ymd] => 2025-03-02 06:45:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:45:05' and `end` < '2025-03-02 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-03-02 06:45:17] Production.INFO: count ==161 [2025-03-02 06:45:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:45:05 - End Time 2025-03-02 06:45:05 [2025-03-02 06:45:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589381', 'tblTempUsageDetail_20' ) start [2025-03-02 06:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589381', 'tblTempUsageDetail_20' ) end [2025-03-02 06:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589381', 'tblTempVendorCDR_20' ) start [2025-03-02 06:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589381', 'tblTempVendorCDR_20' ) end [2025-03-02 06:45:17] Production.INFO: ProcessCDR(1,14589381,1,1,2) [2025-03-02 06:45:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589381,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:45:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589381,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:45:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589381,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:45:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589381,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:45:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589381', 'tblTempUsageDetail_20' ) start [2025-03-02 06:45:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589381', 'tblTempUsageDetail_20' ) end [2025-03-02 06:45:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:45:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:45:22] Production.INFO: ==14644== Releasing lock... [2025-03-02 06:45:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:45:22] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:46:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:46:06 [end_date_ymd] => 2025-03-02 06:46:06 [RateCDR] => 1 ) [2025-03-02 06: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-03-02 03:46:06' and `end` < '2025-03-02 06: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-03-02 06:46:18] Production.INFO: count ==161 [2025-03-02 06:46:18] Production.ERROR: pbx CDR StartTime 2025-03-02 03:46:06 - End Time 2025-03-02 06:46:06 [2025-03-02 06:46:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589386', 'tblTempUsageDetail_20' ) start [2025-03-02 06:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589386', 'tblTempUsageDetail_20' ) end [2025-03-02 06:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589386', 'tblTempVendorCDR_20' ) start [2025-03-02 06:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589386', 'tblTempVendorCDR_20' ) end [2025-03-02 06:46:18] Production.INFO: ProcessCDR(1,14589386,1,1,2) [2025-03-02 06:46:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589386,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:46:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589386,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:46:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589386,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:46:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589386,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589386', 'tblTempUsageDetail_20' ) start [2025-03-02 06:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589386', 'tblTempUsageDetail_20' ) end [2025-03-02 06:46:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:46:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:46:21] Production.INFO: ==14714== Releasing lock... [2025-03-02 06:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:46:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:47:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:47:05 [end_date_ymd] => 2025-03-02 06:47:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:47:05' and `end` < '2025-03-02 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-03-02 06:47:17] Production.INFO: count ==161 [2025-03-02 06:47:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:47:05 - End Time 2025-03-02 06:47:05 [2025-03-02 06:47:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589391', 'tblTempUsageDetail_20' ) start [2025-03-02 06:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589391', 'tblTempUsageDetail_20' ) end [2025-03-02 06:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589391', 'tblTempVendorCDR_20' ) start [2025-03-02 06:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589391', 'tblTempVendorCDR_20' ) end [2025-03-02 06:47:17] Production.INFO: ProcessCDR(1,14589391,1,1,2) [2025-03-02 06:47:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589391,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:47:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589391,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:47:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589391,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:47:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589391,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:47:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589391', 'tblTempUsageDetail_20' ) start [2025-03-02 06:47:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589391', 'tblTempUsageDetail_20' ) end [2025-03-02 06:47:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:47:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:47:20] Production.INFO: ==14799== Releasing lock... [2025-03-02 06:47:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:47:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:48:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:48:06 [end_date_ymd] => 2025-03-02 06:48:06 [RateCDR] => 1 ) [2025-03-02 06: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-03-02 03:48:06' and `end` < '2025-03-02 06: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-03-02 06:48:18] Production.INFO: count ==161 [2025-03-02 06:48:18] Production.ERROR: pbx CDR StartTime 2025-03-02 03:48:06 - End Time 2025-03-02 06:48:06 [2025-03-02 06:48:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589396', 'tblTempUsageDetail_20' ) start [2025-03-02 06:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589396', 'tblTempUsageDetail_20' ) end [2025-03-02 06:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589396', 'tblTempVendorCDR_20' ) start [2025-03-02 06:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589396', 'tblTempVendorCDR_20' ) end [2025-03-02 06:48:18] Production.INFO: ProcessCDR(1,14589396,1,1,2) [2025-03-02 06:48:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589396,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:48:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589396,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:48:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589396,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:48:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589396,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:48:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589396', 'tblTempUsageDetail_20' ) start [2025-03-02 06:48:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589396', 'tblTempUsageDetail_20' ) end [2025-03-02 06:48:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:48:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:48:21] Production.INFO: ==14877== Releasing lock... [2025-03-02 06:48:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:48:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:49:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:49:05 [end_date_ymd] => 2025-03-02 06:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:49:05' and `end` < '2025-03-02 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-03-02 06:49:17] Production.INFO: count ==165 [2025-03-02 06:49:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:49:05 - End Time 2025-03-02 06:49:05 [2025-03-02 06:49:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589401', 'tblTempUsageDetail_20' ) start [2025-03-02 06:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589401', 'tblTempUsageDetail_20' ) end [2025-03-02 06:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589401', 'tblTempVendorCDR_20' ) start [2025-03-02 06:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589401', 'tblTempVendorCDR_20' ) end [2025-03-02 06:49:17] Production.INFO: ProcessCDR(1,14589401,1,1,2) [2025-03-02 06:49:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589401,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:49:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589401,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:49:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589401,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:49:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589401,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:49:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589401', 'tblTempUsageDetail_20' ) start [2025-03-02 06:49:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589401', 'tblTempUsageDetail_20' ) end [2025-03-02 06:49:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:49:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:49:20] Production.INFO: ==14949== Releasing lock... [2025-03-02 06:49:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:49:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:50:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:50:06 [end_date_ymd] => 2025-03-02 06:50:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:50:06' and `end` < '2025-03-02 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-03-02 06:50:18] Production.INFO: count ==171 [2025-03-02 06:50:18] Production.ERROR: pbx CDR StartTime 2025-03-02 03:50:06 - End Time 2025-03-02 06:50:06 [2025-03-02 06:50:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589407', 'tblTempUsageDetail_20' ) start [2025-03-02 06:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589407', 'tblTempUsageDetail_20' ) end [2025-03-02 06:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589407', 'tblTempVendorCDR_20' ) start [2025-03-02 06:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589407', 'tblTempVendorCDR_20' ) end [2025-03-02 06:50:18] Production.INFO: ProcessCDR(1,14589407,1,1,2) [2025-03-02 06:50:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589407,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:50:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589407,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:50:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589407,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:50:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589407,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:50:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589407', 'tblTempUsageDetail_20' ) start [2025-03-02 06:50:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589407', 'tblTempUsageDetail_20' ) end [2025-03-02 06:50:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:50:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:50:21] Production.INFO: ==15036== Releasing lock... [2025-03-02 06:50:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:50:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:51:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:51:05 [end_date_ymd] => 2025-03-02 06:51:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:51:05' and `end` < '2025-03-02 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-03-02 06:51:17] Production.INFO: count ==171 [2025-03-02 06:51:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:51:05 - End Time 2025-03-02 06:51:05 [2025-03-02 06:51:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589412', 'tblTempUsageDetail_20' ) start [2025-03-02 06:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589412', 'tblTempUsageDetail_20' ) end [2025-03-02 06:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589412', 'tblTempVendorCDR_20' ) start [2025-03-02 06:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589412', 'tblTempVendorCDR_20' ) end [2025-03-02 06:51:17] Production.INFO: ProcessCDR(1,14589412,1,1,2) [2025-03-02 06:51:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589412,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:51:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589412,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:51:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589412,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:51:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589412,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:51:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589412', 'tblTempUsageDetail_20' ) start [2025-03-02 06:51:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589412', 'tblTempUsageDetail_20' ) end [2025-03-02 06:51:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:51:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:51:20] Production.INFO: ==15161== Releasing lock... [2025-03-02 06:51:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:51:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 06:52:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:52:05 [end_date_ymd] => 2025-03-02 06:52:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:52:05' and `end` < '2025-03-02 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-03-02 06:52:17] Production.INFO: count ==175 [2025-03-02 06:52:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:52:05 - End Time 2025-03-02 06:52:05 [2025-03-02 06:52:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589417', 'tblTempUsageDetail_20' ) start [2025-03-02 06:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589417', 'tblTempUsageDetail_20' ) end [2025-03-02 06:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589417', 'tblTempVendorCDR_20' ) start [2025-03-02 06:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589417', 'tblTempVendorCDR_20' ) end [2025-03-02 06:52:17] Production.INFO: ProcessCDR(1,14589417,1,1,2) [2025-03-02 06:52:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589417,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:52:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589417,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:52:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589417,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:52:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589417,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:52:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589417', 'tblTempUsageDetail_20' ) start [2025-03-02 06:52:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589417', 'tblTempUsageDetail_20' ) end [2025-03-02 06:52:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:52:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:52:20] Production.INFO: ==15236== Releasing lock... [2025-03-02 06:52:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:52:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 06:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:53:05 [end_date_ymd] => 2025-03-02 06:53:05 [RateCDR] => 1 ) [2025-03-02 06: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-03-02 03:53:05' and `end` < '2025-03-02 06: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-03-02 06:53:17] Production.INFO: count ==176 [2025-03-02 06:53:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:53:05 - End Time 2025-03-02 06:53:05 [2025-03-02 06:53:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589422', 'tblTempUsageDetail_20' ) start [2025-03-02 06:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589422', 'tblTempUsageDetail_20' ) end [2025-03-02 06:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589422', 'tblTempVendorCDR_20' ) start [2025-03-02 06:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589422', 'tblTempVendorCDR_20' ) end [2025-03-02 06:53:17] Production.INFO: ProcessCDR(1,14589422,1,1,2) [2025-03-02 06:53:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589422,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:53:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589422,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:53:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589422,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:53:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589422,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589422', 'tblTempUsageDetail_20' ) start [2025-03-02 06:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589422', 'tblTempUsageDetail_20' ) end [2025-03-02 06:53:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:53:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:53:21] Production.INFO: ==15309== Releasing lock... [2025-03-02 06:53:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:53:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 06:54:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:54:06 [end_date_ymd] => 2025-03-02 06:54:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:54:06' and `end` < '2025-03-02 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-03-02 06:54:18] Production.INFO: count ==177 [2025-03-02 06:54:18] Production.ERROR: pbx CDR StartTime 2025-03-02 03:54:06 - End Time 2025-03-02 06:54:06 [2025-03-02 06:54:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589427', 'tblTempUsageDetail_20' ) start [2025-03-02 06:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589427', 'tblTempUsageDetail_20' ) end [2025-03-02 06:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589427', 'tblTempVendorCDR_20' ) start [2025-03-02 06:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589427', 'tblTempVendorCDR_20' ) end [2025-03-02 06:54:18] Production.INFO: ProcessCDR(1,14589427,1,1,2) [2025-03-02 06:54:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589427,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:54:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589427,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:54:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589427,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:54:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589427,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:54:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589427', 'tblTempUsageDetail_20' ) start [2025-03-02 06:54:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589427', 'tblTempUsageDetail_20' ) end [2025-03-02 06:54:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:54:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:54:22] Production.INFO: ==15386== Releasing lock... [2025-03-02 06:54:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:54:22] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 06:55:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:55:06 [end_date_ymd] => 2025-03-02 06:55:06 [RateCDR] => 1 ) [2025-03-02 06: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-03-02 03:55:06' and `end` < '2025-03-02 06: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-03-02 06:55:17] Production.INFO: count ==178 [2025-03-02 06:55:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:55:06 - End Time 2025-03-02 06:55:06 [2025-03-02 06:55:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589432', 'tblTempUsageDetail_20' ) start [2025-03-02 06:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589432', 'tblTempUsageDetail_20' ) end [2025-03-02 06:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589432', 'tblTempVendorCDR_20' ) start [2025-03-02 06:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589432', 'tblTempVendorCDR_20' ) end [2025-03-02 06:55:17] Production.INFO: ProcessCDR(1,14589432,1,1,2) [2025-03-02 06:55:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589432,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:55:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589432,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:55:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589432,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:55:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589432,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:55:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589432', 'tblTempUsageDetail_20' ) start [2025-03-02 06:55:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589432', 'tblTempUsageDetail_20' ) end [2025-03-02 06:55:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:55:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:55:22] Production.INFO: ==15466== Releasing lock... [2025-03-02 06:55:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:55:22] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 06:56:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:56:05 [end_date_ymd] => 2025-03-02 06:56:05 [RateCDR] => 1 ) [2025-03-02 06: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-03-02 03:56:05' and `end` < '2025-03-02 06: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-03-02 06:56:17] Production.INFO: count ==179 [2025-03-02 06:56:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:56:05 - End Time 2025-03-02 06:56:05 [2025-03-02 06:56:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589437', 'tblTempUsageDetail_20' ) start [2025-03-02 06:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589437', 'tblTempUsageDetail_20' ) end [2025-03-02 06:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589437', 'tblTempVendorCDR_20' ) start [2025-03-02 06:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589437', 'tblTempVendorCDR_20' ) end [2025-03-02 06:56:17] Production.INFO: ProcessCDR(1,14589437,1,1,2) [2025-03-02 06:56:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589437,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:56:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589437,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:56:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589437,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:56:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589437,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:56:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589437', 'tblTempUsageDetail_20' ) start [2025-03-02 06:56:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589437', 'tblTempUsageDetail_20' ) end [2025-03-02 06:56:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:56:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:56:21] Production.INFO: ==15545== Releasing lock... [2025-03-02 06:56:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:56:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 06:57:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:57:05 [end_date_ymd] => 2025-03-02 06:57:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:57:05' and `end` < '2025-03-02 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-03-02 06:57:17] Production.INFO: count ==179 [2025-03-02 06:57:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:57:05 - End Time 2025-03-02 06:57:05 [2025-03-02 06:57:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589442', 'tblTempUsageDetail_20' ) start [2025-03-02 06:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589442', 'tblTempUsageDetail_20' ) end [2025-03-02 06:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589442', 'tblTempVendorCDR_20' ) start [2025-03-02 06:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589442', 'tblTempVendorCDR_20' ) end [2025-03-02 06:57:17] Production.INFO: ProcessCDR(1,14589442,1,1,2) [2025-03-02 06:57:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589442,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:57:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589442,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:57:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589442,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:57:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589442,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:57:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589442', 'tblTempUsageDetail_20' ) start [2025-03-02 06:57:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589442', 'tblTempUsageDetail_20' ) end [2025-03-02 06:57:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:57:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:57:20] Production.INFO: ==15630== Releasing lock... [2025-03-02 06:57:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:57:20] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 06:58:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:58:05 [end_date_ymd] => 2025-03-02 06:58:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 03:58:05' and `end` < '2025-03-02 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-03-02 06:58:17] Production.INFO: count ==179 [2025-03-02 06:58:17] Production.ERROR: pbx CDR StartTime 2025-03-02 03:58:05 - End Time 2025-03-02 06:58:05 [2025-03-02 06:58:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589447', 'tblTempUsageDetail_20' ) start [2025-03-02 06:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589447', 'tblTempUsageDetail_20' ) end [2025-03-02 06:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589447', 'tblTempVendorCDR_20' ) start [2025-03-02 06:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589447', 'tblTempVendorCDR_20' ) end [2025-03-02 06:58:17] Production.INFO: ProcessCDR(1,14589447,1,1,2) [2025-03-02 06:58:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589447,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:58:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589447,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:58:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589447,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:58:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589447,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:58:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589447', 'tblTempUsageDetail_20' ) start [2025-03-02 06:58:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589447', 'tblTempUsageDetail_20' ) end [2025-03-02 06:58:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:58:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:58:20] Production.INFO: ==15721== Releasing lock... [2025-03-02 06:58:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:58:20] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 06:59:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 03:59:06 [end_date_ymd] => 2025-03-02 06:59:06 [RateCDR] => 1 ) [2025-03-02 06: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-03-02 03:59:06' and `end` < '2025-03-02 06: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-03-02 06:59:18] Production.INFO: count ==175 [2025-03-02 06:59:18] Production.ERROR: pbx CDR StartTime 2025-03-02 03:59:06 - End Time 2025-03-02 06:59:06 [2025-03-02 06:59:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 06:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589452', 'tblTempUsageDetail_20' ) start [2025-03-02 06:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589452', 'tblTempUsageDetail_20' ) end [2025-03-02 06:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589452', 'tblTempVendorCDR_20' ) start [2025-03-02 06:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589452', 'tblTempVendorCDR_20' ) end [2025-03-02 06:59:18] Production.INFO: ProcessCDR(1,14589452,1,1,2) [2025-03-02 06:59:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589452,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:59:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589452,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 06:59:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589452,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:59:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589452,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 06:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589452', 'tblTempUsageDetail_20' ) start [2025-03-02 06:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589452', 'tblTempUsageDetail_20' ) end [2025-03-02 06:59:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 06:59:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 06:59:21] Production.INFO: ==15794== Releasing lock... [2025-03-02 06:59:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 06:59:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:00:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:00:05 [end_date_ymd] => 2025-03-02 07:00:05 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:00:05' and `end` < '2025-03-02 07: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-03-02 07:00:17] Production.INFO: count ==171 [2025-03-02 07:00:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:00:05 - End Time 2025-03-02 07:00:05 [2025-03-02 07:00:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589458', 'tblTempUsageDetail_20' ) start [2025-03-02 07:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589458', 'tblTempUsageDetail_20' ) end [2025-03-02 07:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589458', 'tblTempVendorCDR_20' ) start [2025-03-02 07:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589458', 'tblTempVendorCDR_20' ) end [2025-03-02 07:00:17] Production.INFO: ProcessCDR(1,14589458,1,1,2) [2025-03-02 07:00:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589458,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:00:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589458,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:00:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589458,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:00:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589458,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:00:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589458', 'tblTempUsageDetail_20' ) start [2025-03-02 07:00:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589458', 'tblTempUsageDetail_20' ) end [2025-03-02 07:00:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:00:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:00:21] Production.INFO: ==15873== Releasing lock... [2025-03-02 07:00:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:00:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 07:01:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:01:06 [end_date_ymd] => 2025-03-02 07:01:06 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:01:06' and `end` < '2025-03-02 07: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-03-02 07:01:18] Production.INFO: count ==179 [2025-03-02 07:01:18] Production.ERROR: pbx CDR StartTime 2025-03-02 04:01:06 - End Time 2025-03-02 07:01:06 [2025-03-02 07:01:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589463', 'tblTempUsageDetail_20' ) start [2025-03-02 07:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589463', 'tblTempUsageDetail_20' ) end [2025-03-02 07:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589463', 'tblTempVendorCDR_20' ) start [2025-03-02 07:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589463', 'tblTempVendorCDR_20' ) end [2025-03-02 07:01:18] Production.INFO: ProcessCDR(1,14589463,1,1,2) [2025-03-02 07:01:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589463,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:01:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589463,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:01:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589463,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:01:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589463,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589463', 'tblTempUsageDetail_20' ) start [2025-03-02 07:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589463', 'tblTempUsageDetail_20' ) end [2025-03-02 07:01:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:01:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:01:21] Production.INFO: ==16046== Releasing lock... [2025-03-02 07:01:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:01:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:02:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:02:05 [end_date_ymd] => 2025-03-02 07:02:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:02:05' and `end` < '2025-03-02 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-03-02 07:02:19] Production.INFO: count ==179 [2025-03-02 07:02:19] Production.ERROR: pbx CDR StartTime 2025-03-02 04:02:05 - End Time 2025-03-02 07:02:05 [2025-03-02 07:02:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:02:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589468', 'tblTempUsageDetail_20' ) start [2025-03-02 07:02:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589468', 'tblTempUsageDetail_20' ) end [2025-03-02 07:02:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589468', 'tblTempVendorCDR_20' ) start [2025-03-02 07:02:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589468', 'tblTempVendorCDR_20' ) end [2025-03-02 07:02:19] Production.INFO: ProcessCDR(1,14589468,1,1,2) [2025-03-02 07:02:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589468,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:02:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589468,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:02:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589468,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:02:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589468,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:02:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589468', 'tblTempUsageDetail_20' ) start [2025-03-02 07:02:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589468', 'tblTempUsageDetail_20' ) end [2025-03-02 07:02:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:02:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:02:22] Production.INFO: ==16129== Releasing lock... [2025-03-02 07:02:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:02:22] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:03:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:03:05 [end_date_ymd] => 2025-03-02 07:03:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:03:05' and `end` < '2025-03-02 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-03-02 07:03:18] Production.INFO: count ==179 [2025-03-02 07:03:18] Production.ERROR: pbx CDR StartTime 2025-03-02 04:03:05 - End Time 2025-03-02 07:03:05 [2025-03-02 07:03:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589473', 'tblTempUsageDetail_20' ) start [2025-03-02 07:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589473', 'tblTempUsageDetail_20' ) end [2025-03-02 07:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589473', 'tblTempVendorCDR_20' ) start [2025-03-02 07:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589473', 'tblTempVendorCDR_20' ) end [2025-03-02 07:03:18] Production.INFO: ProcessCDR(1,14589473,1,1,2) [2025-03-02 07:03:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589473,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:03:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589473,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:03:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589473,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:03:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589473,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:03:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589473', 'tblTempUsageDetail_20' ) start [2025-03-02 07:03:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589473', 'tblTempUsageDetail_20' ) end [2025-03-02 07:03:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:03:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:03:21] Production.INFO: ==16205== Releasing lock... [2025-03-02 07:03:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:03:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:04:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:04:05 [end_date_ymd] => 2025-03-02 07:04:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:04:05' and `end` < '2025-03-02 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-03-02 07:04:17] Production.INFO: count ==179 [2025-03-02 07:04:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:04:05 - End Time 2025-03-02 07:04:05 [2025-03-02 07:04:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589478', 'tblTempUsageDetail_20' ) start [2025-03-02 07:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589478', 'tblTempUsageDetail_20' ) end [2025-03-02 07:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589478', 'tblTempVendorCDR_20' ) start [2025-03-02 07:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589478', 'tblTempVendorCDR_20' ) end [2025-03-02 07:04:17] Production.INFO: ProcessCDR(1,14589478,1,1,2) [2025-03-02 07:04:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589478,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:04:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589478,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:04:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589478,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:04:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589478,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:04:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589478', 'tblTempUsageDetail_20' ) start [2025-03-02 07:04:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589478', 'tblTempUsageDetail_20' ) end [2025-03-02 07:04:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:04:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:04:20] Production.INFO: ==16287== Releasing lock... [2025-03-02 07:04:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:04:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:05:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:05:06 [end_date_ymd] => 2025-03-02 07:05:06 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:05:06' and `end` < '2025-03-02 07: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-03-02 07:05:18] Production.INFO: count ==179 [2025-03-02 07:05:18] Production.ERROR: pbx CDR StartTime 2025-03-02 04:05:06 - End Time 2025-03-02 07:05:06 [2025-03-02 07:05:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589483', 'tblTempUsageDetail_20' ) start [2025-03-02 07:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589483', 'tblTempUsageDetail_20' ) end [2025-03-02 07:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589483', 'tblTempVendorCDR_20' ) start [2025-03-02 07:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589483', 'tblTempVendorCDR_20' ) end [2025-03-02 07:05:18] Production.INFO: ProcessCDR(1,14589483,1,1,2) [2025-03-02 07:05:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589483,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:05:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589483,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:05:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589483,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:05:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589483,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:05:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589483', 'tblTempUsageDetail_20' ) start [2025-03-02 07:05:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589483', 'tblTempUsageDetail_20' ) end [2025-03-02 07:05:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:05:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:05:21] Production.INFO: ==16445== Releasing lock... [2025-03-02 07:05:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:05:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:06:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:06:05 [end_date_ymd] => 2025-03-02 07:06:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:06:05' and `end` < '2025-03-02 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-03-02 07:06:17] Production.INFO: count ==179 [2025-03-02 07:06:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:06:05 - End Time 2025-03-02 07:06:05 [2025-03-02 07:06:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589488', 'tblTempUsageDetail_20' ) start [2025-03-02 07:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589488', 'tblTempUsageDetail_20' ) end [2025-03-02 07:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589488', 'tblTempVendorCDR_20' ) start [2025-03-02 07:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589488', 'tblTempVendorCDR_20' ) end [2025-03-02 07:06:17] Production.INFO: ProcessCDR(1,14589488,1,1,2) [2025-03-02 07:06:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589488,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:06:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589488,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:06:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589488,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:06:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589488,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:06:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589488', 'tblTempUsageDetail_20' ) start [2025-03-02 07:06:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589488', 'tblTempUsageDetail_20' ) end [2025-03-02 07:06:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:06:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:06:20] Production.INFO: ==16562== Releasing lock... [2025-03-02 07:06:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:06:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:07:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:07:05 [end_date_ymd] => 2025-03-02 07:07:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:07:05' and `end` < '2025-03-02 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-03-02 07:07:18] Production.INFO: count ==179 [2025-03-02 07:07:18] Production.ERROR: pbx CDR StartTime 2025-03-02 04:07:05 - End Time 2025-03-02 07:07:05 [2025-03-02 07:07:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589493', 'tblTempUsageDetail_20' ) start [2025-03-02 07:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589493', 'tblTempUsageDetail_20' ) end [2025-03-02 07:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589493', 'tblTempVendorCDR_20' ) start [2025-03-02 07:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589493', 'tblTempVendorCDR_20' ) end [2025-03-02 07:07:18] Production.INFO: ProcessCDR(1,14589493,1,1,2) [2025-03-02 07:07:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589493,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:07:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589493,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:07:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589493,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:07:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589493,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:07:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589493', 'tblTempUsageDetail_20' ) start [2025-03-02 07:07:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589493', 'tblTempUsageDetail_20' ) end [2025-03-02 07:07:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:07:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:07:21] Production.INFO: ==16639== Releasing lock... [2025-03-02 07:07:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:07:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:08:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:08:05 [end_date_ymd] => 2025-03-02 07:08:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:08:05' and `end` < '2025-03-02 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-03-02 07:08:17] Production.INFO: count ==179 [2025-03-02 07:08:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:08:05 - End Time 2025-03-02 07:08:05 [2025-03-02 07:08:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589498', 'tblTempUsageDetail_20' ) start [2025-03-02 07:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589498', 'tblTempUsageDetail_20' ) end [2025-03-02 07:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589498', 'tblTempVendorCDR_20' ) start [2025-03-02 07:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589498', 'tblTempVendorCDR_20' ) end [2025-03-02 07:08:17] Production.INFO: ProcessCDR(1,14589498,1,1,2) [2025-03-02 07:08:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589498,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:08:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589498,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:08:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589498,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:08:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589498,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:08:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589498', 'tblTempUsageDetail_20' ) start [2025-03-02 07:08:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589498', 'tblTempUsageDetail_20' ) end [2025-03-02 07:08:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:08:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:08:20] Production.INFO: ==16790== Releasing lock... [2025-03-02 07:08:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:08:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:09:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:09:05 [end_date_ymd] => 2025-03-02 07:09:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:09:05' and `end` < '2025-03-02 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-03-02 07:09:18] Production.INFO: count ==179 [2025-03-02 07:09:18] Production.ERROR: pbx CDR StartTime 2025-03-02 04:09:05 - End Time 2025-03-02 07:09:05 [2025-03-02 07:09:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589503', 'tblTempUsageDetail_20' ) start [2025-03-02 07:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589503', 'tblTempUsageDetail_20' ) end [2025-03-02 07:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589503', 'tblTempVendorCDR_20' ) start [2025-03-02 07:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589503', 'tblTempVendorCDR_20' ) end [2025-03-02 07:09:18] Production.INFO: ProcessCDR(1,14589503,1,1,2) [2025-03-02 07:09:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589503,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:09:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589503,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:09:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589503,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:09:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589503,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:09:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589503', 'tblTempUsageDetail_20' ) start [2025-03-02 07:09:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589503', 'tblTempUsageDetail_20' ) end [2025-03-02 07:09:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:09:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:09:21] Production.INFO: ==16875== Releasing lock... [2025-03-02 07:09:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:09:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:10:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:10:06 [end_date_ymd] => 2025-03-02 07:10:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:10:06' and `end` < '2025-03-02 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-03-02 07:10:18] Production.INFO: count ==183 [2025-03-02 07:10:18] Production.ERROR: pbx CDR StartTime 2025-03-02 04:10:06 - End Time 2025-03-02 07:10:06 [2025-03-02 07:10:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589509', 'tblTempUsageDetail_20' ) start [2025-03-02 07:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589509', 'tblTempUsageDetail_20' ) end [2025-03-02 07:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589509', 'tblTempVendorCDR_20' ) start [2025-03-02 07:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589509', 'tblTempVendorCDR_20' ) end [2025-03-02 07:10:18] Production.INFO: ProcessCDR(1,14589509,1,1,2) [2025-03-02 07:10:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589509,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:10:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589509,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:10:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589509,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:10:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589509,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:10:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589509', 'tblTempUsageDetail_20' ) start [2025-03-02 07:10:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589509', 'tblTempUsageDetail_20' ) end [2025-03-02 07:10:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:10:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:10:22] Production.INFO: ==16952== Releasing lock... [2025-03-02 07:10:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:10:22] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:11:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:11:05 [end_date_ymd] => 2025-03-02 07:11:05 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:11:05' and `end` < '2025-03-02 07: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-03-02 07:11:19] Production.INFO: count ==186 [2025-03-02 07:11:19] Production.ERROR: pbx CDR StartTime 2025-03-02 04:11:05 - End Time 2025-03-02 07:11:05 [2025-03-02 07:11:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:11:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589514', 'tblTempUsageDetail_20' ) start [2025-03-02 07:11:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589514', 'tblTempUsageDetail_20' ) end [2025-03-02 07:11:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589514', 'tblTempVendorCDR_20' ) start [2025-03-02 07:11:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589514', 'tblTempVendorCDR_20' ) end [2025-03-02 07:11:19] Production.INFO: ProcessCDR(1,14589514,1,1,2) [2025-03-02 07:11:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589514,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:11:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589514,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:11:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589514,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:11:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589514,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:11:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589514', 'tblTempUsageDetail_20' ) start [2025-03-02 07:11:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589514', 'tblTempUsageDetail_20' ) end [2025-03-02 07:11:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:11:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:11:24] Production.INFO: ==17037== Releasing lock... [2025-03-02 07:11:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:11:24] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:12:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:12:06 [end_date_ymd] => 2025-03-02 07:12:06 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:12:06' and `end` < '2025-03-02 07: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-03-02 07:12:18] Production.INFO: count ==186 [2025-03-02 07:12:18] Production.ERROR: pbx CDR StartTime 2025-03-02 04:12:06 - End Time 2025-03-02 07:12:06 [2025-03-02 07:12:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589519', 'tblTempUsageDetail_20' ) start [2025-03-02 07:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589519', 'tblTempUsageDetail_20' ) end [2025-03-02 07:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589519', 'tblTempVendorCDR_20' ) start [2025-03-02 07:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589519', 'tblTempVendorCDR_20' ) end [2025-03-02 07:12:18] Production.INFO: ProcessCDR(1,14589519,1,1,2) [2025-03-02 07:12:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589519,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:12:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589519,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:12:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589519,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:12:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589519,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:12:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589519', 'tblTempUsageDetail_20' ) start [2025-03-02 07:12:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589519', 'tblTempUsageDetail_20' ) end [2025-03-02 07:12:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:12:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:12:21] Production.INFO: ==17203== Releasing lock... [2025-03-02 07:12:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:12:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:13:05 [end_date_ymd] => 2025-03-02 07:13:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:13:05' and `end` < '2025-03-02 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-03-02 07:13:17] Production.INFO: count ==186 [2025-03-02 07:13:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:13:05 - End Time 2025-03-02 07:13:05 [2025-03-02 07:13:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589524', 'tblTempUsageDetail_20' ) start [2025-03-02 07:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589524', 'tblTempUsageDetail_20' ) end [2025-03-02 07:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589524', 'tblTempVendorCDR_20' ) start [2025-03-02 07:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589524', 'tblTempVendorCDR_20' ) end [2025-03-02 07:13:17] Production.INFO: ProcessCDR(1,14589524,1,1,2) [2025-03-02 07:13:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589524,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:13:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589524,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:13:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589524,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:13:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589524,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:13:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589524', 'tblTempUsageDetail_20' ) start [2025-03-02 07:13:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589524', 'tblTempUsageDetail_20' ) end [2025-03-02 07:13:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:13:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:13:20] Production.INFO: ==17282== Releasing lock... [2025-03-02 07:13:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:13:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:14:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:14:05 [end_date_ymd] => 2025-03-02 07:14:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:14:05' and `end` < '2025-03-02 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-03-02 07:14:18] Production.INFO: count ==186 [2025-03-02 07:14:18] Production.ERROR: pbx CDR StartTime 2025-03-02 04:14:05 - End Time 2025-03-02 07:14:05 [2025-03-02 07:14:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589529', 'tblTempUsageDetail_20' ) start [2025-03-02 07:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589529', 'tblTempUsageDetail_20' ) end [2025-03-02 07:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589529', 'tblTempVendorCDR_20' ) start [2025-03-02 07:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589529', 'tblTempVendorCDR_20' ) end [2025-03-02 07:14:18] Production.INFO: ProcessCDR(1,14589529,1,1,2) [2025-03-02 07:14:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589529,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:14:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589529,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:14:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589529,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:14:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589529,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:14:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589529', 'tblTempUsageDetail_20' ) start [2025-03-02 07:14:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589529', 'tblTempUsageDetail_20' ) end [2025-03-02 07:14:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:14:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:14:21] Production.INFO: ==17365== Releasing lock... [2025-03-02 07:14:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:14:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:15:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:15:05 [end_date_ymd] => 2025-03-02 07:15:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:15:05' and `end` < '2025-03-02 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-03-02 07:15:17] Production.INFO: count ==186 [2025-03-02 07:15:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:15:05 - End Time 2025-03-02 07:15:05 [2025-03-02 07:15:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589534', 'tblTempUsageDetail_20' ) start [2025-03-02 07:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589534', 'tblTempUsageDetail_20' ) end [2025-03-02 07:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589534', 'tblTempVendorCDR_20' ) start [2025-03-02 07:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589534', 'tblTempVendorCDR_20' ) end [2025-03-02 07:15:17] Production.INFO: ProcessCDR(1,14589534,1,1,2) [2025-03-02 07:15:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589534,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:15:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589534,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:15:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589534,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:15:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589534,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:15:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589534', 'tblTempUsageDetail_20' ) start [2025-03-02 07:15:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589534', 'tblTempUsageDetail_20' ) end [2025-03-02 07:15:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:15:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:15:20] Production.INFO: ==17514== Releasing lock... [2025-03-02 07:15:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:15:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:16:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:16:05 [end_date_ymd] => 2025-03-02 07:16:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:16:05' and `end` < '2025-03-02 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-03-02 07:16:18] Production.INFO: count ==186 [2025-03-02 07:16:18] Production.ERROR: pbx CDR StartTime 2025-03-02 04:16:05 - End Time 2025-03-02 07:16:05 [2025-03-02 07:16:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589539', 'tblTempUsageDetail_20' ) start [2025-03-02 07:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589539', 'tblTempUsageDetail_20' ) end [2025-03-02 07:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589539', 'tblTempVendorCDR_20' ) start [2025-03-02 07:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589539', 'tblTempVendorCDR_20' ) end [2025-03-02 07:16:18] Production.INFO: ProcessCDR(1,14589539,1,1,2) [2025-03-02 07:16:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589539,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:16:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589539,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:16:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589539,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:16:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589539,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589539', 'tblTempUsageDetail_20' ) start [2025-03-02 07:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589539', 'tblTempUsageDetail_20' ) end [2025-03-02 07:16:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:16:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:16:21] Production.INFO: ==17589== Releasing lock... [2025-03-02 07:16:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:16:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:17:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:17:05 [end_date_ymd] => 2025-03-02 07:17:05 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:17:05' and `end` < '2025-03-02 07: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-03-02 07:17:17] Production.INFO: count ==186 [2025-03-02 07:17:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:17:05 - End Time 2025-03-02 07:17:05 [2025-03-02 07:17:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589544', 'tblTempUsageDetail_20' ) start [2025-03-02 07:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589544', 'tblTempUsageDetail_20' ) end [2025-03-02 07:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589544', 'tblTempVendorCDR_20' ) start [2025-03-02 07:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589544', 'tblTempVendorCDR_20' ) end [2025-03-02 07:17:17] Production.INFO: ProcessCDR(1,14589544,1,1,2) [2025-03-02 07:17:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589544,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:17:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589544,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:17:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589544,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:17:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589544,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:17:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589544', 'tblTempUsageDetail_20' ) start [2025-03-02 07:17:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589544', 'tblTempUsageDetail_20' ) end [2025-03-02 07:17:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:17:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:17:20] Production.INFO: ==17675== Releasing lock... [2025-03-02 07:17:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:17:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:18:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:18:05 [end_date_ymd] => 2025-03-02 07:18:05 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:18:05' and `end` < '2025-03-02 07: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-03-02 07:18:17] Production.INFO: count ==186 [2025-03-02 07:18:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:18:05 - End Time 2025-03-02 07:18:05 [2025-03-02 07:18:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589549', 'tblTempUsageDetail_20' ) start [2025-03-02 07:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589549', 'tblTempUsageDetail_20' ) end [2025-03-02 07:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589549', 'tblTempVendorCDR_20' ) start [2025-03-02 07:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589549', 'tblTempVendorCDR_20' ) end [2025-03-02 07:18:17] Production.INFO: ProcessCDR(1,14589549,1,1,2) [2025-03-02 07:18:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589549,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:18:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589549,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:18:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589549,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:18:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589549,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589549', 'tblTempUsageDetail_20' ) start [2025-03-02 07:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589549', 'tblTempUsageDetail_20' ) end [2025-03-02 07:18:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:18:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:18:21] Production.INFO: ==17756== Releasing lock... [2025-03-02 07:18:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:18:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:19:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:19:05 [end_date_ymd] => 2025-03-02 07:19:05 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:19:05' and `end` < '2025-03-02 07: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-03-02 07:19:17] Production.INFO: count ==186 [2025-03-02 07:19:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:19:05 - End Time 2025-03-02 07:19:05 [2025-03-02 07:19:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589554', 'tblTempUsageDetail_20' ) start [2025-03-02 07:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589554', 'tblTempUsageDetail_20' ) end [2025-03-02 07:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589554', 'tblTempVendorCDR_20' ) start [2025-03-02 07:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589554', 'tblTempVendorCDR_20' ) end [2025-03-02 07:19:17] Production.INFO: ProcessCDR(1,14589554,1,1,2) [2025-03-02 07:19:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589554,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:19:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589554,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:19:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589554,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:19:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589554,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:19:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589554', 'tblTempUsageDetail_20' ) start [2025-03-02 07:19:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589554', 'tblTempUsageDetail_20' ) end [2025-03-02 07:19:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:19:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:19:20] Production.INFO: ==17833== Releasing lock... [2025-03-02 07:19:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:19:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:20:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:20:06 [end_date_ymd] => 2025-03-02 07:20:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:20:06' and `end` < '2025-03-02 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-03-02 07:20:18] Production.INFO: count ==181 [2025-03-02 07:20:18] Production.ERROR: pbx CDR StartTime 2025-03-02 04:20:06 - End Time 2025-03-02 07:20:06 [2025-03-02 07:20:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589560', 'tblTempUsageDetail_20' ) start [2025-03-02 07:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589560', 'tblTempUsageDetail_20' ) end [2025-03-02 07:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589560', 'tblTempVendorCDR_20' ) start [2025-03-02 07:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589560', 'tblTempVendorCDR_20' ) end [2025-03-02 07:20:18] Production.INFO: ProcessCDR(1,14589560,1,1,2) [2025-03-02 07:20:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589560,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:20:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589560,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:20:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589560,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:20:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589560,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:20:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589560', 'tblTempUsageDetail_20' ) start [2025-03-02 07:20:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589560', 'tblTempUsageDetail_20' ) end [2025-03-02 07:20:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:20:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:20:21] Production.INFO: ==17906== Releasing lock... [2025-03-02 07:20:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:20:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:21:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:21:05 [end_date_ymd] => 2025-03-02 07:21:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:21:05' and `end` < '2025-03-02 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-03-02 07:21:17] Production.INFO: count ==178 [2025-03-02 07:21:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:21:05 - End Time 2025-03-02 07:21:05 [2025-03-02 07:21:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589565', 'tblTempUsageDetail_20' ) start [2025-03-02 07:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589565', 'tblTempUsageDetail_20' ) end [2025-03-02 07:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589565', 'tblTempVendorCDR_20' ) start [2025-03-02 07:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589565', 'tblTempVendorCDR_20' ) end [2025-03-02 07:21:17] Production.INFO: ProcessCDR(1,14589565,1,1,2) [2025-03-02 07:21:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589565,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:21:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589565,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:21:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589565,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:21:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589565,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:21:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589565', 'tblTempUsageDetail_20' ) start [2025-03-02 07:21:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589565', 'tblTempUsageDetail_20' ) end [2025-03-02 07:21:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:21:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:21:20] Production.INFO: ==17982== Releasing lock... [2025-03-02 07:21:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:21:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:22:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:22:05 [end_date_ymd] => 2025-03-02 07:22:05 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:22:05' and `end` < '2025-03-02 07: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-03-02 07:22:17] Production.INFO: count ==178 [2025-03-02 07:22:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:22:05 - End Time 2025-03-02 07:22:05 [2025-03-02 07:22:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589570', 'tblTempUsageDetail_20' ) start [2025-03-02 07:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589570', 'tblTempUsageDetail_20' ) end [2025-03-02 07:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589570', 'tblTempVendorCDR_20' ) start [2025-03-02 07:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589570', 'tblTempVendorCDR_20' ) end [2025-03-02 07:22:17] Production.INFO: ProcessCDR(1,14589570,1,1,2) [2025-03-02 07:22:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589570,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:22:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589570,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:22:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589570,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:22:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589570,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589570', 'tblTempUsageDetail_20' ) start [2025-03-02 07:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589570', 'tblTempUsageDetail_20' ) end [2025-03-02 07:22:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:22:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:22:21] Production.INFO: ==18109== Releasing lock... [2025-03-02 07:22:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:22:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:23:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:23:05 [end_date_ymd] => 2025-03-02 07:23:05 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:23:05' and `end` < '2025-03-02 07: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-03-02 07:23:17] Production.INFO: count ==178 [2025-03-02 07:23:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:23:05 - End Time 2025-03-02 07:23:05 [2025-03-02 07:23:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589575', 'tblTempUsageDetail_20' ) start [2025-03-02 07:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589575', 'tblTempUsageDetail_20' ) end [2025-03-02 07:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589575', 'tblTempVendorCDR_20' ) start [2025-03-02 07:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589575', 'tblTempVendorCDR_20' ) end [2025-03-02 07:23:17] Production.INFO: ProcessCDR(1,14589575,1,1,2) [2025-03-02 07:23:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589575,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:23:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589575,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:23:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589575,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:23:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589575,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:23:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589575', 'tblTempUsageDetail_20' ) start [2025-03-02 07:23:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589575', 'tblTempUsageDetail_20' ) end [2025-03-02 07:23:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:23:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:23:20] Production.INFO: ==18187== Releasing lock... [2025-03-02 07:23:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:23:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:24:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:24:05 [end_date_ymd] => 2025-03-02 07:24:05 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:24:05' and `end` < '2025-03-02 07: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-03-02 07:24:17] Production.INFO: count ==178 [2025-03-02 07:24:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:24:05 - End Time 2025-03-02 07:24:05 [2025-03-02 07:24:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589580', 'tblTempUsageDetail_20' ) start [2025-03-02 07:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589580', 'tblTempUsageDetail_20' ) end [2025-03-02 07:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589580', 'tblTempVendorCDR_20' ) start [2025-03-02 07:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589580', 'tblTempVendorCDR_20' ) end [2025-03-02 07:24:17] Production.INFO: ProcessCDR(1,14589580,1,1,2) [2025-03-02 07:24:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589580,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:24:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589580,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:24:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589580,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:24:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589580,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:24:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589580', 'tblTempUsageDetail_20' ) start [2025-03-02 07:24:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589580', 'tblTempUsageDetail_20' ) end [2025-03-02 07:24:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:24:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:24:20] Production.INFO: ==18268== Releasing lock... [2025-03-02 07:24:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:24:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:25:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:25:06 [end_date_ymd] => 2025-03-02 07:25:06 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:25:06' and `end` < '2025-03-02 07: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-03-02 07:25:18] Production.INFO: count ==178 [2025-03-02 07:25:18] Production.ERROR: pbx CDR StartTime 2025-03-02 04:25:06 - End Time 2025-03-02 07:25:06 [2025-03-02 07:25:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589585', 'tblTempUsageDetail_20' ) start [2025-03-02 07:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589585', 'tblTempUsageDetail_20' ) end [2025-03-02 07:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589585', 'tblTempVendorCDR_20' ) start [2025-03-02 07:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589585', 'tblTempVendorCDR_20' ) end [2025-03-02 07:25:18] Production.INFO: ProcessCDR(1,14589585,1,1,2) [2025-03-02 07:25:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589585,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:25:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589585,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:25:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589585,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:25:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589585,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:25:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589585', 'tblTempUsageDetail_20' ) start [2025-03-02 07:25:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589585', 'tblTempUsageDetail_20' ) end [2025-03-02 07:25:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:25:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:25:22] Production.INFO: ==18379== Releasing lock... [2025-03-02 07:25:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:25:22] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:26:05 [end_date_ymd] => 2025-03-02 07:26:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:26:05' and `end` < '2025-03-02 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-03-02 07:26:17] Production.INFO: count ==178 [2025-03-02 07:26:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:26:05 - End Time 2025-03-02 07:26:05 [2025-03-02 07:26:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589590', 'tblTempUsageDetail_20' ) start [2025-03-02 07:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589590', 'tblTempUsageDetail_20' ) end [2025-03-02 07:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589590', 'tblTempVendorCDR_20' ) start [2025-03-02 07:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589590', 'tblTempVendorCDR_20' ) end [2025-03-02 07:26:17] Production.INFO: ProcessCDR(1,14589590,1,1,2) [2025-03-02 07:26:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589590,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:26:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589590,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:26:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589590,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:26:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589590,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:26:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589590', 'tblTempUsageDetail_20' ) start [2025-03-02 07:26:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589590', 'tblTempUsageDetail_20' ) end [2025-03-02 07:26:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:26:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:26:21] Production.INFO: ==18498== Releasing lock... [2025-03-02 07:26:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:26:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:27:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:27:05 [end_date_ymd] => 2025-03-02 07:27:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:27:05' and `end` < '2025-03-02 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-03-02 07:27:17] Production.INFO: count ==178 [2025-03-02 07:27:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:27:05 - End Time 2025-03-02 07:27:05 [2025-03-02 07:27:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589594', 'tblTempUsageDetail_20' ) start [2025-03-02 07:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589594', 'tblTempUsageDetail_20' ) end [2025-03-02 07:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589594', 'tblTempVendorCDR_20' ) start [2025-03-02 07:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589594', 'tblTempVendorCDR_20' ) end [2025-03-02 07:27:17] Production.INFO: ProcessCDR(1,14589594,1,1,2) [2025-03-02 07:27:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589594,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:27:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589594,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:27:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589594,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:27:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589594,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:27:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589594', 'tblTempUsageDetail_20' ) start [2025-03-02 07:27:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589594', 'tblTempUsageDetail_20' ) end [2025-03-02 07:27:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:27:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:27:20] Production.INFO: ==18599== Releasing lock... [2025-03-02 07:27:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:27:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:28:05 [end_date_ymd] => 2025-03-02 07:28:05 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:28:05' and `end` < '2025-03-02 07: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-03-02 07:28:17] Production.INFO: count ==180 [2025-03-02 07:28:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:28:05 - End Time 2025-03-02 07:28:05 [2025-03-02 07:28:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589600', 'tblTempUsageDetail_20' ) start [2025-03-02 07:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589600', 'tblTempUsageDetail_20' ) end [2025-03-02 07:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589600', 'tblTempVendorCDR_20' ) start [2025-03-02 07:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589600', 'tblTempVendorCDR_20' ) end [2025-03-02 07:28:17] Production.INFO: ProcessCDR(1,14589600,1,1,2) [2025-03-02 07:28:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589600,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:28:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589600,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:28:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589600,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:28:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589600,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:28:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589600', 'tblTempUsageDetail_20' ) start [2025-03-02 07:28:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589600', 'tblTempUsageDetail_20' ) end [2025-03-02 07:28:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:28:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:28:20] Production.INFO: ==18700== Releasing lock... [2025-03-02 07:28:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:28:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:29:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:29:06 [end_date_ymd] => 2025-03-02 07:29:06 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:29:06' and `end` < '2025-03-02 07: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-03-02 07:29:17] Production.INFO: count ==180 [2025-03-02 07:29:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:29:06 - End Time 2025-03-02 07:29:06 [2025-03-02 07:29:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589605', 'tblTempUsageDetail_20' ) start [2025-03-02 07:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589605', 'tblTempUsageDetail_20' ) end [2025-03-02 07:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589605', 'tblTempVendorCDR_20' ) start [2025-03-02 07:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589605', 'tblTempVendorCDR_20' ) end [2025-03-02 07:29:17] Production.INFO: ProcessCDR(1,14589605,1,1,2) [2025-03-02 07:29:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589605,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:29:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589605,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:29:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589605,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:29:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589605,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:29:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589605', 'tblTempUsageDetail_20' ) start [2025-03-02 07:29:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589605', 'tblTempUsageDetail_20' ) end [2025-03-02 07:29:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:29:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:29:21] Production.INFO: ==18805== Releasing lock... [2025-03-02 07:29:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:29:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:30:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:30:06 [end_date_ymd] => 2025-03-02 07:30:06 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:30:06' and `end` < '2025-03-02 07: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-03-02 07:30:18] Production.INFO: count ==177 [2025-03-02 07:30:18] Production.ERROR: pbx CDR StartTime 2025-03-02 04:30:06 - End Time 2025-03-02 07:30:06 [2025-03-02 07:30:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589611', 'tblTempUsageDetail_20' ) start [2025-03-02 07:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589611', 'tblTempUsageDetail_20' ) end [2025-03-02 07:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589611', 'tblTempVendorCDR_20' ) start [2025-03-02 07:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589611', 'tblTempVendorCDR_20' ) end [2025-03-02 07:30:18] Production.INFO: ProcessCDR(1,14589611,1,1,2) [2025-03-02 07:30:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589611,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:30:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589611,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:30:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589611,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:30:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589611,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:30:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589611', 'tblTempUsageDetail_20' ) start [2025-03-02 07:30:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589611', 'tblTempUsageDetail_20' ) end [2025-03-02 07:30:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:30:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:30:21] Production.INFO: ==18916== Releasing lock... [2025-03-02 07:30:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:30:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:31:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:31:06 [end_date_ymd] => 2025-03-02 07:31:06 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:31:06' and `end` < '2025-03-02 07: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-03-02 07:31:18] Production.INFO: count ==177 [2025-03-02 07:31:18] Production.ERROR: pbx CDR StartTime 2025-03-02 04:31:06 - End Time 2025-03-02 07:31:06 [2025-03-02 07:31:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589616', 'tblTempUsageDetail_20' ) start [2025-03-02 07:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589616', 'tblTempUsageDetail_20' ) end [2025-03-02 07:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589616', 'tblTempVendorCDR_20' ) start [2025-03-02 07:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589616', 'tblTempVendorCDR_20' ) end [2025-03-02 07:31:18] Production.INFO: ProcessCDR(1,14589616,1,1,2) [2025-03-02 07:31:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589616,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:31:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589616,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:31:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589616,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:31:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589616,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:31:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589616', 'tblTempUsageDetail_20' ) start [2025-03-02 07:31:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589616', 'tblTempUsageDetail_20' ) end [2025-03-02 07:31:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:31:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:31:21] Production.INFO: ==19026== Releasing lock... [2025-03-02 07:31:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:31:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:32:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:32:05 [end_date_ymd] => 2025-03-02 07:32:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:32:05' and `end` < '2025-03-02 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-03-02 07:32:17] Production.INFO: count ==177 [2025-03-02 07:32:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:32:05 - End Time 2025-03-02 07:32:05 [2025-03-02 07:32:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589621', 'tblTempUsageDetail_20' ) start [2025-03-02 07:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589621', 'tblTempUsageDetail_20' ) end [2025-03-02 07:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589621', 'tblTempVendorCDR_20' ) start [2025-03-02 07:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589621', 'tblTempVendorCDR_20' ) end [2025-03-02 07:32:17] Production.INFO: ProcessCDR(1,14589621,1,1,2) [2025-03-02 07:32:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589621,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:32:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589621,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:32:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589621,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:32:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589621,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:32:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589621', 'tblTempUsageDetail_20' ) start [2025-03-02 07:32:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589621', 'tblTempUsageDetail_20' ) end [2025-03-02 07:32:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:32:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:32:20] Production.INFO: ==19144== Releasing lock... [2025-03-02 07:32:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:32:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:33:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:33:06 [end_date_ymd] => 2025-03-02 07:33:06 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:33:06' and `end` < '2025-03-02 07: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-03-02 07:33:18] Production.INFO: count ==177 [2025-03-02 07:33:18] Production.ERROR: pbx CDR StartTime 2025-03-02 04:33:06 - End Time 2025-03-02 07:33:06 [2025-03-02 07:33:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589626', 'tblTempUsageDetail_20' ) start [2025-03-02 07:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589626', 'tblTempUsageDetail_20' ) end [2025-03-02 07:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589626', 'tblTempVendorCDR_20' ) start [2025-03-02 07:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589626', 'tblTempVendorCDR_20' ) end [2025-03-02 07:33:18] Production.INFO: ProcessCDR(1,14589626,1,1,2) [2025-03-02 07:33:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589626,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:33:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589626,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:33:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589626,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:33:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589626,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:33:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589626', 'tblTempUsageDetail_20' ) start [2025-03-02 07:33:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589626', 'tblTempUsageDetail_20' ) end [2025-03-02 07:33:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:33:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:33:21] Production.INFO: ==19251== Releasing lock... [2025-03-02 07:33:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:33:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:34:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:34:05 [end_date_ymd] => 2025-03-02 07:34:05 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:34:05' and `end` < '2025-03-02 07: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-03-02 07:34:17] Production.INFO: count ==178 [2025-03-02 07:34:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:34:05 - End Time 2025-03-02 07:34:05 [2025-03-02 07:34:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589631', 'tblTempUsageDetail_20' ) start [2025-03-02 07:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589631', 'tblTempUsageDetail_20' ) end [2025-03-02 07:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589631', 'tblTempVendorCDR_20' ) start [2025-03-02 07:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589631', 'tblTempVendorCDR_20' ) end [2025-03-02 07:34:17] Production.INFO: ProcessCDR(1,14589631,1,1,2) [2025-03-02 07:34:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589631,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:34:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589631,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:34:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589631,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:34:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589631,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:34:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589631', 'tblTempUsageDetail_20' ) start [2025-03-02 07:34:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589631', 'tblTempUsageDetail_20' ) end [2025-03-02 07:34:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:34:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:34:22] Production.INFO: ==19348== Releasing lock... [2025-03-02 07:34:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:34:22] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:35:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:35:05 [end_date_ymd] => 2025-03-02 07:35:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:35:05' and `end` < '2025-03-02 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-03-02 07:35:17] Production.INFO: count ==178 [2025-03-02 07:35:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:35:05 - End Time 2025-03-02 07:35:05 [2025-03-02 07:35:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589636', 'tblTempUsageDetail_20' ) start [2025-03-02 07:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589636', 'tblTempUsageDetail_20' ) end [2025-03-02 07:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589636', 'tblTempVendorCDR_20' ) start [2025-03-02 07:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589636', 'tblTempVendorCDR_20' ) end [2025-03-02 07:35:17] Production.INFO: ProcessCDR(1,14589636,1,1,2) [2025-03-02 07:35:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589636,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:35:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589636,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:35:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589636,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:35:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589636,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:35:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589636', 'tblTempUsageDetail_20' ) start [2025-03-02 07:35:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589636', 'tblTempUsageDetail_20' ) end [2025-03-02 07:35:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:35:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:35:21] Production.INFO: ==19449== Releasing lock... [2025-03-02 07:35:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:35:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:36:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:36:05 [end_date_ymd] => 2025-03-02 07:36:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:36:05' and `end` < '2025-03-02 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-03-02 07:36:17] Production.INFO: count ==179 [2025-03-02 07:36:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:36:05 - End Time 2025-03-02 07:36:05 [2025-03-02 07:36:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589641', 'tblTempUsageDetail_20' ) start [2025-03-02 07:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589641', 'tblTempUsageDetail_20' ) end [2025-03-02 07:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589641', 'tblTempVendorCDR_20' ) start [2025-03-02 07:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589641', 'tblTempVendorCDR_20' ) end [2025-03-02 07:36:17] Production.INFO: ProcessCDR(1,14589641,1,1,2) [2025-03-02 07:36:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589641,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:36:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589641,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:36:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589641,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:36:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589641,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:36:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589641', 'tblTempUsageDetail_20' ) start [2025-03-02 07:36:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589641', 'tblTempUsageDetail_20' ) end [2025-03-02 07:36:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:36:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:36:21] Production.INFO: ==19564== Releasing lock... [2025-03-02 07:36:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:36:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:37:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:37:06 [end_date_ymd] => 2025-03-02 07:37:06 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:37:06' and `end` < '2025-03-02 07: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-03-02 07:37:17] Production.INFO: count ==179 [2025-03-02 07:37:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:37:06 - End Time 2025-03-02 07:37:06 [2025-03-02 07:37:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589646', 'tblTempUsageDetail_20' ) start [2025-03-02 07:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589646', 'tblTempUsageDetail_20' ) end [2025-03-02 07:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589646', 'tblTempVendorCDR_20' ) start [2025-03-02 07:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589646', 'tblTempVendorCDR_20' ) end [2025-03-02 07:37:17] Production.INFO: ProcessCDR(1,14589646,1,1,2) [2025-03-02 07:37:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589646,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:37:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589646,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:37:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589646,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:37:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589646,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589646', 'tblTempUsageDetail_20' ) start [2025-03-02 07:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589646', 'tblTempUsageDetail_20' ) end [2025-03-02 07:37:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:37:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:37:21] Production.INFO: ==19720== Releasing lock... [2025-03-02 07:37:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:37:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:38:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:38:05 [end_date_ymd] => 2025-03-02 07:38:05 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:38:05' and `end` < '2025-03-02 07: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-03-02 07:38:17] Production.INFO: count ==177 [2025-03-02 07:38:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:38:05 - End Time 2025-03-02 07:38:05 [2025-03-02 07:38:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589651', 'tblTempUsageDetail_20' ) start [2025-03-02 07:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589651', 'tblTempUsageDetail_20' ) end [2025-03-02 07:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589651', 'tblTempVendorCDR_20' ) start [2025-03-02 07:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589651', 'tblTempVendorCDR_20' ) end [2025-03-02 07:38:17] Production.INFO: ProcessCDR(1,14589651,1,1,2) [2025-03-02 07:38:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589651,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:38:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589651,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:38:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589651,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:38:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589651,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:38:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589651', 'tblTempUsageDetail_20' ) start [2025-03-02 07:38:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589651', 'tblTempUsageDetail_20' ) end [2025-03-02 07:38:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:38:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:38:20] Production.INFO: ==19839== Releasing lock... [2025-03-02 07:38:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:38:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:39:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:39:05 [end_date_ymd] => 2025-03-02 07:39:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:39:05' and `end` < '2025-03-02 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-03-02 07:39:17] Production.INFO: count ==177 [2025-03-02 07:39:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:39:05 - End Time 2025-03-02 07:39:05 [2025-03-02 07:39:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589656', 'tblTempUsageDetail_20' ) start [2025-03-02 07:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589656', 'tblTempUsageDetail_20' ) end [2025-03-02 07:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589656', 'tblTempVendorCDR_20' ) start [2025-03-02 07:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589656', 'tblTempVendorCDR_20' ) end [2025-03-02 07:39:17] Production.INFO: ProcessCDR(1,14589656,1,1,2) [2025-03-02 07:39:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589656,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:39:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589656,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:39:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589656,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:39:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589656,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:39:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589656', 'tblTempUsageDetail_20' ) start [2025-03-02 07:39:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589656', 'tblTempUsageDetail_20' ) end [2025-03-02 07:39:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:39:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:39:20] Production.INFO: ==19962== Releasing lock... [2025-03-02 07:39:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:39:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:40:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:40:06 [end_date_ymd] => 2025-03-02 07:40:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:40:06' and `end` < '2025-03-02 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-03-02 07:40:18] Production.INFO: count ==180 [2025-03-02 07:40:18] Production.ERROR: pbx CDR StartTime 2025-03-02 04:40:06 - End Time 2025-03-02 07:40:06 [2025-03-02 07:40:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589662', 'tblTempUsageDetail_20' ) start [2025-03-02 07:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589662', 'tblTempUsageDetail_20' ) end [2025-03-02 07:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589662', 'tblTempVendorCDR_20' ) start [2025-03-02 07:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589662', 'tblTempVendorCDR_20' ) end [2025-03-02 07:40:18] Production.INFO: ProcessCDR(1,14589662,1,1,2) [2025-03-02 07:40:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589662,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:40:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589662,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:40:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589662,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:40:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589662,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:40:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589662', 'tblTempUsageDetail_20' ) start [2025-03-02 07:40:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589662', 'tblTempUsageDetail_20' ) end [2025-03-02 07:40:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:40:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:40:22] Production.INFO: ==20065== Releasing lock... [2025-03-02 07:40:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:40:22] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:41:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:41:05 [end_date_ymd] => 2025-03-02 07:41:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:41:05' and `end` < '2025-03-02 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-03-02 07:41:17] Production.INFO: count ==182 [2025-03-02 07:41:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:41:05 - End Time 2025-03-02 07:41:05 [2025-03-02 07:41:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589667', 'tblTempUsageDetail_20' ) start [2025-03-02 07:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589667', 'tblTempUsageDetail_20' ) end [2025-03-02 07:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589667', 'tblTempVendorCDR_20' ) start [2025-03-02 07:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589667', 'tblTempVendorCDR_20' ) end [2025-03-02 07:41:17] Production.INFO: ProcessCDR(1,14589667,1,1,2) [2025-03-02 07:41:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589667,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:41:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589667,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:41:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589667,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:41:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589667,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:41:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589667', 'tblTempUsageDetail_20' ) start [2025-03-02 07:41:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589667', 'tblTempUsageDetail_20' ) end [2025-03-02 07:41:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:41:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:41:20] Production.INFO: ==20175== Releasing lock... [2025-03-02 07:41:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:41:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:42:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:42:06 [end_date_ymd] => 2025-03-02 07:42:06 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:42:06' and `end` < '2025-03-02 07: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-03-02 07:42:18] Production.INFO: count ==182 [2025-03-02 07:42:18] Production.ERROR: pbx CDR StartTime 2025-03-02 04:42:06 - End Time 2025-03-02 07:42:06 [2025-03-02 07:42:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589672', 'tblTempUsageDetail_20' ) start [2025-03-02 07:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589672', 'tblTempUsageDetail_20' ) end [2025-03-02 07:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589672', 'tblTempVendorCDR_20' ) start [2025-03-02 07:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589672', 'tblTempVendorCDR_20' ) end [2025-03-02 07:42:18] Production.INFO: ProcessCDR(1,14589672,1,1,2) [2025-03-02 07:42:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589672,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:42:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589672,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:42:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589672,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:42:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589672,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:42:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589672', 'tblTempUsageDetail_20' ) start [2025-03-02 07:42:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589672', 'tblTempUsageDetail_20' ) end [2025-03-02 07:42:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:42:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:42:21] Production.INFO: ==20259== Releasing lock... [2025-03-02 07:42:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:42:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:43:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:43:05 [end_date_ymd] => 2025-03-02 07:43:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:43:05' and `end` < '2025-03-02 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-03-02 07:43:17] Production.INFO: count ==182 [2025-03-02 07:43:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:43:05 - End Time 2025-03-02 07:43:05 [2025-03-02 07:43:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589677', 'tblTempUsageDetail_20' ) start [2025-03-02 07:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589677', 'tblTempUsageDetail_20' ) end [2025-03-02 07:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589677', 'tblTempVendorCDR_20' ) start [2025-03-02 07:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589677', 'tblTempVendorCDR_20' ) end [2025-03-02 07:43:17] Production.INFO: ProcessCDR(1,14589677,1,1,2) [2025-03-02 07:43:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589677,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:43:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589677,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:43:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589677,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:43:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589677,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:43:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589677', 'tblTempUsageDetail_20' ) start [2025-03-02 07:43:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589677', 'tblTempUsageDetail_20' ) end [2025-03-02 07:43:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:43:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:43:20] Production.INFO: ==20355== Releasing lock... [2025-03-02 07:43:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:43:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:44:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:44:06 [end_date_ymd] => 2025-03-02 07:44:06 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:44:06' and `end` < '2025-03-02 07: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-03-02 07:44:17] Production.INFO: count ==182 [2025-03-02 07:44:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:44:06 - End Time 2025-03-02 07:44:06 [2025-03-02 07:44:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589682', 'tblTempUsageDetail_20' ) start [2025-03-02 07:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589682', 'tblTempUsageDetail_20' ) end [2025-03-02 07:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589682', 'tblTempVendorCDR_20' ) start [2025-03-02 07:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589682', 'tblTempVendorCDR_20' ) end [2025-03-02 07:44:17] Production.INFO: ProcessCDR(1,14589682,1,1,2) [2025-03-02 07:44:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589682,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:44:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589682,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:44:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589682,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:44:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589682,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589682', 'tblTempUsageDetail_20' ) start [2025-03-02 07:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589682', 'tblTempUsageDetail_20' ) end [2025-03-02 07:44:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:44:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:44:21] Production.INFO: ==20478== Releasing lock... [2025-03-02 07:44:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:44:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:45:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:45:05 [end_date_ymd] => 2025-03-02 07:45:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:45:05' and `end` < '2025-03-02 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-03-02 07:45:17] Production.INFO: count ==182 [2025-03-02 07:45:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:45:05 - End Time 2025-03-02 07:45:05 [2025-03-02 07:45:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589687', 'tblTempUsageDetail_20' ) start [2025-03-02 07:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589687', 'tblTempUsageDetail_20' ) end [2025-03-02 07:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589687', 'tblTempVendorCDR_20' ) start [2025-03-02 07:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589687', 'tblTempVendorCDR_20' ) end [2025-03-02 07:45:17] Production.INFO: ProcessCDR(1,14589687,1,1,2) [2025-03-02 07:45:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589687,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:45:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589687,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:45:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589687,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:45:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589687,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:45:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589687', 'tblTempUsageDetail_20' ) start [2025-03-02 07:45:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589687', 'tblTempUsageDetail_20' ) end [2025-03-02 07:45:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:45:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:45:20] Production.INFO: ==20587== Releasing lock... [2025-03-02 07:45:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:45:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:46:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:46:05 [end_date_ymd] => 2025-03-02 07:46:05 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:46:05' and `end` < '2025-03-02 07: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-03-02 07:46:18] Production.INFO: count ==182 [2025-03-02 07:46:18] Production.ERROR: pbx CDR StartTime 2025-03-02 04:46:05 - End Time 2025-03-02 07:46:05 [2025-03-02 07:46:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589692', 'tblTempUsageDetail_20' ) start [2025-03-02 07:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589692', 'tblTempUsageDetail_20' ) end [2025-03-02 07:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589692', 'tblTempVendorCDR_20' ) start [2025-03-02 07:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589692', 'tblTempVendorCDR_20' ) end [2025-03-02 07:46:18] Production.INFO: ProcessCDR(1,14589692,1,1,2) [2025-03-02 07:46:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589692,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:46:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589692,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:46:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589692,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:46:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589692,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589692', 'tblTempUsageDetail_20' ) start [2025-03-02 07:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589692', 'tblTempUsageDetail_20' ) end [2025-03-02 07:46:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:46:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:46:21] Production.INFO: ==20669== Releasing lock... [2025-03-02 07:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:46:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:47:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:47:05 [end_date_ymd] => 2025-03-02 07:47:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:47:05' and `end` < '2025-03-02 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-03-02 07:47:16] Production.INFO: count ==182 [2025-03-02 07:47:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:47:05 - End Time 2025-03-02 07:47:05 [2025-03-02 07:47:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589697', 'tblTempUsageDetail_20' ) start [2025-03-02 07:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589697', 'tblTempUsageDetail_20' ) end [2025-03-02 07:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589697', 'tblTempVendorCDR_20' ) start [2025-03-02 07:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589697', 'tblTempVendorCDR_20' ) end [2025-03-02 07:47:17] Production.INFO: ProcessCDR(1,14589697,1,1,2) [2025-03-02 07:47:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589697,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:47:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589697,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:47:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589697,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:47:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589697,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:47:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589697', 'tblTempUsageDetail_20' ) start [2025-03-02 07:47:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589697', 'tblTempUsageDetail_20' ) end [2025-03-02 07:47:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:47:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:47:20] Production.INFO: ==20749== Releasing lock... [2025-03-02 07:47:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:47:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:48:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:48:05 [end_date_ymd] => 2025-03-02 07:48:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:48:05' and `end` < '2025-03-02 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-03-02 07:48:17] Production.INFO: count ==182 [2025-03-02 07:48:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:48:05 - End Time 2025-03-02 07:48:05 [2025-03-02 07:48:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589702', 'tblTempUsageDetail_20' ) start [2025-03-02 07:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589702', 'tblTempUsageDetail_20' ) end [2025-03-02 07:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589702', 'tblTempVendorCDR_20' ) start [2025-03-02 07:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589702', 'tblTempVendorCDR_20' ) end [2025-03-02 07:48:17] Production.INFO: ProcessCDR(1,14589702,1,1,2) [2025-03-02 07:48:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589702,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:48:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589702,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:48:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589702,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:48:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589702,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:48:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589702', 'tblTempUsageDetail_20' ) start [2025-03-02 07:48:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589702', 'tblTempUsageDetail_20' ) end [2025-03-02 07:48:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:48:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:48:20] Production.INFO: ==20832== Releasing lock... [2025-03-02 07:48:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:48:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:49:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:49:05 [end_date_ymd] => 2025-03-02 07:49:05 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:49:05' and `end` < '2025-03-02 07: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-03-02 07:49:17] Production.INFO: count ==182 [2025-03-02 07:49:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:49:05 - End Time 2025-03-02 07:49:05 [2025-03-02 07:49:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589707', 'tblTempUsageDetail_20' ) start [2025-03-02 07:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589707', 'tblTempUsageDetail_20' ) end [2025-03-02 07:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589707', 'tblTempVendorCDR_20' ) start [2025-03-02 07:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589707', 'tblTempVendorCDR_20' ) end [2025-03-02 07:49:17] Production.INFO: ProcessCDR(1,14589707,1,1,2) [2025-03-02 07:49:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589707,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:49:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589707,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:49:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589707,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:49:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589707,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:49:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589707', 'tblTempUsageDetail_20' ) start [2025-03-02 07:49:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589707', 'tblTempUsageDetail_20' ) end [2025-03-02 07:49:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:49:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:49:20] Production.INFO: ==20917== Releasing lock... [2025-03-02 07:49:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:49:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:50:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:50:06 [end_date_ymd] => 2025-03-02 07:50:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:50:06' and `end` < '2025-03-02 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-03-02 07:50:18] Production.INFO: count ==184 [2025-03-02 07:50:18] Production.ERROR: pbx CDR StartTime 2025-03-02 04:50:06 - End Time 2025-03-02 07:50:06 [2025-03-02 07:50:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589713', 'tblTempUsageDetail_20' ) start [2025-03-02 07:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589713', 'tblTempUsageDetail_20' ) end [2025-03-02 07:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589713', 'tblTempVendorCDR_20' ) start [2025-03-02 07:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589713', 'tblTempVendorCDR_20' ) end [2025-03-02 07:50:18] Production.INFO: ProcessCDR(1,14589713,1,1,2) [2025-03-02 07:50:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589713,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:50:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589713,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:50:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589713,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:50:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589713,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:50:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589713', 'tblTempUsageDetail_20' ) start [2025-03-02 07:50:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589713', 'tblTempUsageDetail_20' ) end [2025-03-02 07:50:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:50:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:50:21] Production.INFO: ==21001== Releasing lock... [2025-03-02 07:50:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:50:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:51:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:51:06 [end_date_ymd] => 2025-03-02 07:51:06 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:51:06' and `end` < '2025-03-02 07: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-03-02 07:51:18] Production.INFO: count ==184 [2025-03-02 07:51:18] Production.ERROR: pbx CDR StartTime 2025-03-02 04:51:06 - End Time 2025-03-02 07:51:06 [2025-03-02 07:51:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589718', 'tblTempUsageDetail_20' ) start [2025-03-02 07:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589718', 'tblTempUsageDetail_20' ) end [2025-03-02 07:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589718', 'tblTempVendorCDR_20' ) start [2025-03-02 07:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589718', 'tblTempVendorCDR_20' ) end [2025-03-02 07:51:18] Production.INFO: ProcessCDR(1,14589718,1,1,2) [2025-03-02 07:51:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589718,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:51:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589718,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:51:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589718,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:51:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589718,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:51:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589718', 'tblTempUsageDetail_20' ) start [2025-03-02 07:51:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589718', 'tblTempUsageDetail_20' ) end [2025-03-02 07:51:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:51:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:51:21] Production.INFO: ==21078== Releasing lock... [2025-03-02 07:51:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:51:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:52:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:52:05 [end_date_ymd] => 2025-03-02 07:52:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:52:05' and `end` < '2025-03-02 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-03-02 07:52:17] Production.INFO: count ==184 [2025-03-02 07:52:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:52:05 - End Time 2025-03-02 07:52:05 [2025-03-02 07:52:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589723', 'tblTempUsageDetail_20' ) start [2025-03-02 07:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589723', 'tblTempUsageDetail_20' ) end [2025-03-02 07:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589723', 'tblTempVendorCDR_20' ) start [2025-03-02 07:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589723', 'tblTempVendorCDR_20' ) end [2025-03-02 07:52:17] Production.INFO: ProcessCDR(1,14589723,1,1,2) [2025-03-02 07:52:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589723,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:52:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589723,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:52:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589723,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:52:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589723,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:52:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589723', 'tblTempUsageDetail_20' ) start [2025-03-02 07:52:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589723', 'tblTempUsageDetail_20' ) end [2025-03-02 07:52:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:52:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:52:20] Production.INFO: ==21185== Releasing lock... [2025-03-02 07:52:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:52:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:53:05 [end_date_ymd] => 2025-03-02 07:53:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 04:53:05' and `end` < '2025-03-02 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-03-02 07:53:18] Production.INFO: count ==184 [2025-03-02 07:53:18] Production.ERROR: pbx CDR StartTime 2025-03-02 04:53:05 - End Time 2025-03-02 07:53:05 [2025-03-02 07:53:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:53:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589728', 'tblTempUsageDetail_20' ) start [2025-03-02 07:53:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589728', 'tblTempUsageDetail_20' ) end [2025-03-02 07:53:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589728', 'tblTempVendorCDR_20' ) start [2025-03-02 07:53:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589728', 'tblTempVendorCDR_20' ) end [2025-03-02 07:53:18] Production.INFO: ProcessCDR(1,14589728,1,1,2) [2025-03-02 07:53:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589728,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:53:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589728,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:53:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589728,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:53:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589728,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589728', 'tblTempUsageDetail_20' ) start [2025-03-02 07:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589728', 'tblTempUsageDetail_20' ) end [2025-03-02 07:53:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:53:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:53:21] Production.INFO: ==21343== Releasing lock... [2025-03-02 07:53:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:53:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:54:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:54:06 [end_date_ymd] => 2025-03-02 07:54:06 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:54:06' and `end` < '2025-03-02 07: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-03-02 07:54:17] Production.INFO: count ==184 [2025-03-02 07:54:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:54:06 - End Time 2025-03-02 07:54:06 [2025-03-02 07:54:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589733', 'tblTempUsageDetail_20' ) start [2025-03-02 07:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589733', 'tblTempUsageDetail_20' ) end [2025-03-02 07:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589733', 'tblTempVendorCDR_20' ) start [2025-03-02 07:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589733', 'tblTempVendorCDR_20' ) end [2025-03-02 07:54:18] Production.INFO: ProcessCDR(1,14589733,1,1,2) [2025-03-02 07:54:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589733,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:54:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589733,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:54:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589733,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:54:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589733,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:54:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589733', 'tblTempUsageDetail_20' ) start [2025-03-02 07:54:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589733', 'tblTempUsageDetail_20' ) end [2025-03-02 07:54:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:54:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:54:21] Production.INFO: ==21479== Releasing lock... [2025-03-02 07:54:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:54:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:55:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:55:06 [end_date_ymd] => 2025-03-02 07:55:06 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:55:06' and `end` < '2025-03-02 07: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-03-02 07:55:18] Production.INFO: count ==184 [2025-03-02 07:55:18] Production.ERROR: pbx CDR StartTime 2025-03-02 04:55:06 - End Time 2025-03-02 07:55:06 [2025-03-02 07:55:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589738', 'tblTempUsageDetail_20' ) start [2025-03-02 07:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589738', 'tblTempUsageDetail_20' ) end [2025-03-02 07:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589738', 'tblTempVendorCDR_20' ) start [2025-03-02 07:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589738', 'tblTempVendorCDR_20' ) end [2025-03-02 07:55:18] Production.INFO: ProcessCDR(1,14589738,1,1,2) [2025-03-02 07:55:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589738,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:55:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589738,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:55:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589738,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:55:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589738,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589738', 'tblTempUsageDetail_20' ) start [2025-03-02 07:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589738', 'tblTempUsageDetail_20' ) end [2025-03-02 07:55:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:55:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:55:21] Production.INFO: ==21605== Releasing lock... [2025-03-02 07:55:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:55:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:56:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:56:05 [end_date_ymd] => 2025-03-02 07:56:05 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:56:05' and `end` < '2025-03-02 07: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-03-02 07:56:17] Production.INFO: count ==184 [2025-03-02 07:56:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:56:05 - End Time 2025-03-02 07:56:05 [2025-03-02 07:56:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589743', 'tblTempUsageDetail_20' ) start [2025-03-02 07:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589743', 'tblTempUsageDetail_20' ) end [2025-03-02 07:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589743', 'tblTempVendorCDR_20' ) start [2025-03-02 07:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589743', 'tblTempVendorCDR_20' ) end [2025-03-02 07:56:17] Production.INFO: ProcessCDR(1,14589743,1,1,2) [2025-03-02 07:56:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589743,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:56:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589743,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:56:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589743,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:56:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589743,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:56:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589743', 'tblTempUsageDetail_20' ) start [2025-03-02 07:56:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589743', 'tblTempUsageDetail_20' ) end [2025-03-02 07:56:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:56:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:56:20] Production.INFO: ==21733== Releasing lock... [2025-03-02 07:56:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:56:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:57:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:57:06 [end_date_ymd] => 2025-03-02 07:57:06 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:57:06' and `end` < '2025-03-02 07: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-03-02 07:57:18] Production.INFO: count ==184 [2025-03-02 07:57:18] Production.ERROR: pbx CDR StartTime 2025-03-02 04:57:06 - End Time 2025-03-02 07:57:06 [2025-03-02 07:57:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589748', 'tblTempUsageDetail_20' ) start [2025-03-02 07:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589748', 'tblTempUsageDetail_20' ) end [2025-03-02 07:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589748', 'tblTempVendorCDR_20' ) start [2025-03-02 07:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589748', 'tblTempVendorCDR_20' ) end [2025-03-02 07:57:18] Production.INFO: ProcessCDR(1,14589748,1,1,2) [2025-03-02 07:57:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589748,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:57:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589748,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:57:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589748,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:57:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589748,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:57:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589748', 'tblTempUsageDetail_20' ) start [2025-03-02 07:57:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589748', 'tblTempUsageDetail_20' ) end [2025-03-02 07:57:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:57:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:57:21] Production.INFO: ==21865== Releasing lock... [2025-03-02 07:57:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:57:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:58:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:58:05 [end_date_ymd] => 2025-03-02 07:58:05 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:58:05' and `end` < '2025-03-02 07: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-03-02 07:58:17] Production.INFO: count ==184 [2025-03-02 07:58:17] Production.ERROR: pbx CDR StartTime 2025-03-02 04:58:05 - End Time 2025-03-02 07:58:05 [2025-03-02 07:58:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589753', 'tblTempUsageDetail_20' ) start [2025-03-02 07:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589753', 'tblTempUsageDetail_20' ) end [2025-03-02 07:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589753', 'tblTempVendorCDR_20' ) start [2025-03-02 07:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589753', 'tblTempVendorCDR_20' ) end [2025-03-02 07:58:17] Production.INFO: ProcessCDR(1,14589753,1,1,2) [2025-03-02 07:58:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589753,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:58:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589753,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:58:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589753,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:58:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589753,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:58:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589753', 'tblTempUsageDetail_20' ) start [2025-03-02 07:58:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589753', 'tblTempUsageDetail_20' ) end [2025-03-02 07:58:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:58:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:58:21] Production.INFO: ==21985== Releasing lock... [2025-03-02 07:58:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:58:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 07:59:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 04:59:06 [end_date_ymd] => 2025-03-02 07:59:06 [RateCDR] => 1 ) [2025-03-02 07: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-03-02 04:59:06' and `end` < '2025-03-02 07: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-03-02 07:59:18] Production.INFO: count ==184 [2025-03-02 07:59:18] Production.ERROR: pbx CDR StartTime 2025-03-02 04:59:06 - End Time 2025-03-02 07:59:06 [2025-03-02 07:59:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 07:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589758', 'tblTempUsageDetail_20' ) start [2025-03-02 07:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589758', 'tblTempUsageDetail_20' ) end [2025-03-02 07:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589758', 'tblTempVendorCDR_20' ) start [2025-03-02 07:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589758', 'tblTempVendorCDR_20' ) end [2025-03-02 07:59:18] Production.INFO: ProcessCDR(1,14589758,1,1,2) [2025-03-02 07:59:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589758,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:59:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589758,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 07:59:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589758,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:59:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589758,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 07:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589758', 'tblTempUsageDetail_20' ) start [2025-03-02 07:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589758', 'tblTempUsageDetail_20' ) end [2025-03-02 07:59:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 07:59:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 07:59:21] Production.INFO: ==22092== Releasing lock... [2025-03-02 07:59:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 07:59:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 08:00:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:00:06 [end_date_ymd] => 2025-03-02 08:00:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:00:06' and `end` < '2025-03-02 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-03-02 08:00:17] Production.INFO: count ==184 [2025-03-02 08:00:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:00:06 - End Time 2025-03-02 08:00:06 [2025-03-02 08:00:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589764', 'tblTempUsageDetail_20' ) start [2025-03-02 08:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589764', 'tblTempUsageDetail_20' ) end [2025-03-02 08:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589764', 'tblTempVendorCDR_20' ) start [2025-03-02 08:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589764', 'tblTempVendorCDR_20' ) end [2025-03-02 08:00:17] Production.INFO: ProcessCDR(1,14589764,1,1,2) [2025-03-02 08:00:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589764,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:00:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589764,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:00:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589764,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:00:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589764,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:00:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589764', 'tblTempUsageDetail_20' ) start [2025-03-02 08:00:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589764', 'tblTempUsageDetail_20' ) end [2025-03-02 08:00:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:00:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:00:21] Production.INFO: ==22201== Releasing lock... [2025-03-02 08:00:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:00:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 08:01:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:01:05 [end_date_ymd] => 2025-03-02 08:01:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:01:05' and `end` < '2025-03-02 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-03-02 08:01:17] Production.INFO: count ==184 [2025-03-02 08:01:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:01:05 - End Time 2025-03-02 08:01:05 [2025-03-02 08:01:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589769', 'tblTempUsageDetail_20' ) start [2025-03-02 08:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589769', 'tblTempUsageDetail_20' ) end [2025-03-02 08:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589769', 'tblTempVendorCDR_20' ) start [2025-03-02 08:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589769', 'tblTempVendorCDR_20' ) end [2025-03-02 08:01:17] Production.INFO: ProcessCDR(1,14589769,1,1,2) [2025-03-02 08:01:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589769,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:01:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589769,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:01:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589769,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:01:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589769,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:01:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589769', 'tblTempUsageDetail_20' ) start [2025-03-02 08:01:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589769', 'tblTempUsageDetail_20' ) end [2025-03-02 08:01:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:01:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:01:20] Production.INFO: ==22318== Releasing lock... [2025-03-02 08:01:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:01:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 08:02:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:02:05 [end_date_ymd] => 2025-03-02 08:02:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:02:05' and `end` < '2025-03-02 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-03-02 08:02:17] Production.INFO: count ==184 [2025-03-02 08:02:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:02:05 - End Time 2025-03-02 08:02:05 [2025-03-02 08:02:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589774', 'tblTempUsageDetail_20' ) start [2025-03-02 08:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589774', 'tblTempUsageDetail_20' ) end [2025-03-02 08:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589774', 'tblTempVendorCDR_20' ) start [2025-03-02 08:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589774', 'tblTempVendorCDR_20' ) end [2025-03-02 08:02:17] Production.INFO: ProcessCDR(1,14589774,1,1,2) [2025-03-02 08:02:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589774,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:02:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589774,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:02:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589774,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:02:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589774,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:02:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589774', 'tblTempUsageDetail_20' ) start [2025-03-02 08:02:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589774', 'tblTempUsageDetail_20' ) end [2025-03-02 08:02:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:02:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:02:20] Production.INFO: ==22426== Releasing lock... [2025-03-02 08:02:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:02:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 08:03:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:03:05 [end_date_ymd] => 2025-03-02 08:03:05 [RateCDR] => 1 ) [2025-03-02 08: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-03-02 05:03:05' and `end` < '2025-03-02 08: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-03-02 08:03:17] Production.INFO: count ==184 [2025-03-02 08:03:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:03:05 - End Time 2025-03-02 08:03:05 [2025-03-02 08:03:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589779', 'tblTempUsageDetail_20' ) start [2025-03-02 08:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589779', 'tblTempUsageDetail_20' ) end [2025-03-02 08:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589779', 'tblTempVendorCDR_20' ) start [2025-03-02 08:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589779', 'tblTempVendorCDR_20' ) end [2025-03-02 08:03:17] Production.INFO: ProcessCDR(1,14589779,1,1,2) [2025-03-02 08:03:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589779,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:03:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589779,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:03:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589779,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:03:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589779,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:03:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589779', 'tblTempUsageDetail_20' ) start [2025-03-02 08:03:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589779', 'tblTempUsageDetail_20' ) end [2025-03-02 08:03:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:03:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:03:20] Production.INFO: ==22539== Releasing lock... [2025-03-02 08:03:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:03:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 08:04:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:04:05 [end_date_ymd] => 2025-03-02 08:04:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:04:05' and `end` < '2025-03-02 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-03-02 08:04:17] Production.INFO: count ==180 [2025-03-02 08:04:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:04:05 - End Time 2025-03-02 08:04:05 [2025-03-02 08:04:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589784', 'tblTempUsageDetail_20' ) start [2025-03-02 08:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589784', 'tblTempUsageDetail_20' ) end [2025-03-02 08:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589784', 'tblTempVendorCDR_20' ) start [2025-03-02 08:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589784', 'tblTempVendorCDR_20' ) end [2025-03-02 08:04:17] Production.INFO: ProcessCDR(1,14589784,1,1,2) [2025-03-02 08:04:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589784,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:04:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589784,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:04:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589784,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:04:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589784,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:04:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589784', 'tblTempUsageDetail_20' ) start [2025-03-02 08:04:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589784', 'tblTempUsageDetail_20' ) end [2025-03-02 08:04:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:04:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:04:21] Production.INFO: ==22647== Releasing lock... [2025-03-02 08:04:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:04:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 08:05:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:05:06 [end_date_ymd] => 2025-03-02 08:05:06 [RateCDR] => 1 ) [2025-03-02 08: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-03-02 05:05:06' and `end` < '2025-03-02 08: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-03-02 08:05:18] Production.INFO: count ==180 [2025-03-02 08:05:18] Production.ERROR: pbx CDR StartTime 2025-03-02 05:05:06 - End Time 2025-03-02 08:05:06 [2025-03-02 08:05:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589789', 'tblTempUsageDetail_20' ) start [2025-03-02 08:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589789', 'tblTempUsageDetail_20' ) end [2025-03-02 08:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589789', 'tblTempVendorCDR_20' ) start [2025-03-02 08:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589789', 'tblTempVendorCDR_20' ) end [2025-03-02 08:05:18] Production.INFO: ProcessCDR(1,14589789,1,1,2) [2025-03-02 08:05:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589789,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:05:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589789,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:05:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589789,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:05:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589789,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:05:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589789', 'tblTempUsageDetail_20' ) start [2025-03-02 08:05:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589789', 'tblTempUsageDetail_20' ) end [2025-03-02 08:05:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:05:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:05:21] Production.INFO: ==22735== Releasing lock... [2025-03-02 08:05:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:05:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 08:06:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:06:05 [end_date_ymd] => 2025-03-02 08:06:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:06:05' and `end` < '2025-03-02 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-03-02 08:06:17] Production.INFO: count ==178 [2025-03-02 08:06:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:06:05 - End Time 2025-03-02 08:06:05 [2025-03-02 08:06:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589794', 'tblTempUsageDetail_20' ) start [2025-03-02 08:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589794', 'tblTempUsageDetail_20' ) end [2025-03-02 08:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589794', 'tblTempVendorCDR_20' ) start [2025-03-02 08:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589794', 'tblTempVendorCDR_20' ) end [2025-03-02 08:06:17] Production.INFO: ProcessCDR(1,14589794,1,1,2) [2025-03-02 08:06:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589794,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:06:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589794,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:06:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589794,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:06:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589794,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:06:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589794', 'tblTempUsageDetail_20' ) start [2025-03-02 08:06:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589794', 'tblTempUsageDetail_20' ) end [2025-03-02 08:06:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:06:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:06:22] Production.INFO: ==22815== Releasing lock... [2025-03-02 08:06:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:06:22] Production.INFO: 29 MB #Memory Used# [2025-03-02 08:07:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:07:05 [end_date_ymd] => 2025-03-02 08:07:05 [RateCDR] => 1 ) [2025-03-02 08: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-03-02 05:07:05' and `end` < '2025-03-02 08: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-03-02 08:07:17] Production.INFO: count ==180 [2025-03-02 08:07:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:07:05 - End Time 2025-03-02 08:07:05 [2025-03-02 08:07:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589799', 'tblTempUsageDetail_20' ) start [2025-03-02 08:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589799', 'tblTempUsageDetail_20' ) end [2025-03-02 08:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589799', 'tblTempVendorCDR_20' ) start [2025-03-02 08:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589799', 'tblTempVendorCDR_20' ) end [2025-03-02 08:07:17] Production.INFO: ProcessCDR(1,14589799,1,1,2) [2025-03-02 08:07:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589799,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:07:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589799,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:07:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589799,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:07:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589799,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:07:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589799', 'tblTempUsageDetail_20' ) start [2025-03-02 08:07:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589799', 'tblTempUsageDetail_20' ) end [2025-03-02 08:07:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:07:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:07:20] Production.INFO: ==22898== Releasing lock... [2025-03-02 08:07:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:07:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 08:08:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:08:05 [end_date_ymd] => 2025-03-02 08:08:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:08:05' and `end` < '2025-03-02 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-03-02 08:08:17] Production.INFO: count ==181 [2025-03-02 08:08:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:08:05 - End Time 2025-03-02 08:08:05 [2025-03-02 08:08:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589804', 'tblTempUsageDetail_20' ) start [2025-03-02 08:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589804', 'tblTempUsageDetail_20' ) end [2025-03-02 08:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589804', 'tblTempVendorCDR_20' ) start [2025-03-02 08:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589804', 'tblTempVendorCDR_20' ) end [2025-03-02 08:08:17] Production.INFO: ProcessCDR(1,14589804,1,1,2) [2025-03-02 08:08:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589804,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:08:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589804,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:08:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589804,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:08:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589804,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:08:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589804', 'tblTempUsageDetail_20' ) start [2025-03-02 08:08:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589804', 'tblTempUsageDetail_20' ) end [2025-03-02 08:08:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:08:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:08:20] Production.INFO: ==23008== Releasing lock... [2025-03-02 08:08:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:08:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 08:09:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:09:06 [end_date_ymd] => 2025-03-02 08:09:06 [RateCDR] => 1 ) [2025-03-02 08: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-03-02 05:09:06' and `end` < '2025-03-02 08: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-03-02 08:09:17] Production.INFO: count ==181 [2025-03-02 08:09:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:09:06 - End Time 2025-03-02 08:09:06 [2025-03-02 08:09:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589809', 'tblTempUsageDetail_20' ) start [2025-03-02 08:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589809', 'tblTempUsageDetail_20' ) end [2025-03-02 08:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589809', 'tblTempVendorCDR_20' ) start [2025-03-02 08:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589809', 'tblTempVendorCDR_20' ) end [2025-03-02 08:09:17] Production.INFO: ProcessCDR(1,14589809,1,1,2) [2025-03-02 08:09:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589809,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:09:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589809,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:09:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589809,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:09:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589809,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:09:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589809', 'tblTempUsageDetail_20' ) start [2025-03-02 08:09:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589809', 'tblTempUsageDetail_20' ) end [2025-03-02 08:09:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:09:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:09:21] Production.INFO: ==23082== Releasing lock... [2025-03-02 08:09:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:09:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 08:10:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:10:06 [end_date_ymd] => 2025-03-02 08:10:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:10:06' and `end` < '2025-03-02 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-03-02 08:10:18] Production.INFO: count ==183 [2025-03-02 08:10:18] Production.ERROR: pbx CDR StartTime 2025-03-02 05:10:06 - End Time 2025-03-02 08:10:06 [2025-03-02 08:10:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589815', 'tblTempUsageDetail_20' ) start [2025-03-02 08:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589815', 'tblTempUsageDetail_20' ) end [2025-03-02 08:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589815', 'tblTempVendorCDR_20' ) start [2025-03-02 08:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589815', 'tblTempVendorCDR_20' ) end [2025-03-02 08:10:18] Production.INFO: ProcessCDR(1,14589815,1,1,2) [2025-03-02 08:10:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589815,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:10:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589815,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:10:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589815,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:10:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589815,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:10:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589815', 'tblTempUsageDetail_20' ) start [2025-03-02 08:10:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589815', 'tblTempUsageDetail_20' ) end [2025-03-02 08:10:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:10:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:10:21] Production.INFO: ==23171== Releasing lock... [2025-03-02 08:10:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:10:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 08:11:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:11:05 [end_date_ymd] => 2025-03-02 08:11:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:11:05' and `end` < '2025-03-02 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-03-02 08:11:17] Production.INFO: count ==187 [2025-03-02 08:11:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:11:05 - End Time 2025-03-02 08:11:05 [2025-03-02 08:11:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589820', 'tblTempUsageDetail_20' ) start [2025-03-02 08:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589820', 'tblTempUsageDetail_20' ) end [2025-03-02 08:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589820', 'tblTempVendorCDR_20' ) start [2025-03-02 08:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589820', 'tblTempVendorCDR_20' ) end [2025-03-02 08:11:17] Production.INFO: ProcessCDR(1,14589820,1,1,2) [2025-03-02 08:11:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589820,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:11:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589820,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:11:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589820,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:11:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589820,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:11:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589820', 'tblTempUsageDetail_20' ) start [2025-03-02 08:11:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589820', 'tblTempUsageDetail_20' ) end [2025-03-02 08:11:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:11:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:11:20] Production.INFO: ==23261== Releasing lock... [2025-03-02 08:11:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:11:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 08:12:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:12:05 [end_date_ymd] => 2025-03-02 08:12:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:12:05' and `end` < '2025-03-02 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-03-02 08:12:17] Production.INFO: count ==187 [2025-03-02 08:12:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:12:05 - End Time 2025-03-02 08:12:05 [2025-03-02 08:12:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589825', 'tblTempUsageDetail_20' ) start [2025-03-02 08:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589825', 'tblTempUsageDetail_20' ) end [2025-03-02 08:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589825', 'tblTempVendorCDR_20' ) start [2025-03-02 08:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589825', 'tblTempVendorCDR_20' ) end [2025-03-02 08:12:17] Production.INFO: ProcessCDR(1,14589825,1,1,2) [2025-03-02 08:12:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589825,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:12:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589825,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:12:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589825,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:12:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589825,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:12:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589825', 'tblTempUsageDetail_20' ) start [2025-03-02 08:12:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589825', 'tblTempUsageDetail_20' ) end [2025-03-02 08:12:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:12:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:12:20] Production.INFO: ==23336== Releasing lock... [2025-03-02 08:12:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:12:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 08:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:13:05 [end_date_ymd] => 2025-03-02 08:13:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:13:05' and `end` < '2025-03-02 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-03-02 08:13:17] Production.INFO: count ==187 [2025-03-02 08:13:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:13:05 - End Time 2025-03-02 08:13:05 [2025-03-02 08:13:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589830', 'tblTempUsageDetail_20' ) start [2025-03-02 08:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589830', 'tblTempUsageDetail_20' ) end [2025-03-02 08:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589830', 'tblTempVendorCDR_20' ) start [2025-03-02 08:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589830', 'tblTempVendorCDR_20' ) end [2025-03-02 08:13:17] Production.INFO: ProcessCDR(1,14589830,1,1,2) [2025-03-02 08:13:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589830,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:13:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589830,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:13:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589830,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:13:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589830,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:13:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589830', 'tblTempUsageDetail_20' ) start [2025-03-02 08:13:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589830', 'tblTempUsageDetail_20' ) end [2025-03-02 08:13:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:13:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:13:20] Production.INFO: ==23415== Releasing lock... [2025-03-02 08:13:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:13:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 08:14:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:14:05 [end_date_ymd] => 2025-03-02 08:14:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:14:05' and `end` < '2025-03-02 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-03-02 08:14:17] Production.INFO: count ==189 [2025-03-02 08:14:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:14:05 - End Time 2025-03-02 08:14:05 [2025-03-02 08:14:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589835', 'tblTempUsageDetail_20' ) start [2025-03-02 08:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589835', 'tblTempUsageDetail_20' ) end [2025-03-02 08:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589835', 'tblTempVendorCDR_20' ) start [2025-03-02 08:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589835', 'tblTempVendorCDR_20' ) end [2025-03-02 08:14:17] Production.INFO: ProcessCDR(1,14589835,1,1,2) [2025-03-02 08:14:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589835,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:14:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589835,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:14:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589835,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:14:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589835,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:14:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589835', 'tblTempUsageDetail_20' ) start [2025-03-02 08:14:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589835', 'tblTempUsageDetail_20' ) end [2025-03-02 08:14:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:14:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:14:20] Production.INFO: ==23510== Releasing lock... [2025-03-02 08:14:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:14:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 08:15:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:15:05 [end_date_ymd] => 2025-03-02 08:15:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:15:05' and `end` < '2025-03-02 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-03-02 08:15:17] Production.INFO: count ==189 [2025-03-02 08:15:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:15:05 - End Time 2025-03-02 08:15:05 [2025-03-02 08:15:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589840', 'tblTempUsageDetail_20' ) start [2025-03-02 08:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589840', 'tblTempUsageDetail_20' ) end [2025-03-02 08:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589840', 'tblTempVendorCDR_20' ) start [2025-03-02 08:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589840', 'tblTempVendorCDR_20' ) end [2025-03-02 08:15:17] Production.INFO: ProcessCDR(1,14589840,1,1,2) [2025-03-02 08:15:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589840,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:15:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589840,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:15:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589840,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:15:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589840,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:15:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589840', 'tblTempUsageDetail_20' ) start [2025-03-02 08:15:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589840', 'tblTempUsageDetail_20' ) end [2025-03-02 08:15:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:15:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:15:20] Production.INFO: ==23601== Releasing lock... [2025-03-02 08:15:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:15:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 08:16:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:16:05 [end_date_ymd] => 2025-03-02 08:16:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:16:05' and `end` < '2025-03-02 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-03-02 08:16:17] Production.INFO: count ==185 [2025-03-02 08:16:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:16:05 - End Time 2025-03-02 08:16:05 [2025-03-02 08:16:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589845', 'tblTempUsageDetail_20' ) start [2025-03-02 08:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589845', 'tblTempUsageDetail_20' ) end [2025-03-02 08:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589845', 'tblTempVendorCDR_20' ) start [2025-03-02 08:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589845', 'tblTempVendorCDR_20' ) end [2025-03-02 08:16:17] Production.INFO: ProcessCDR(1,14589845,1,1,2) [2025-03-02 08:16:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589845,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:16:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589845,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:16:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589845,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:16:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589845,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:16:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589845', 'tblTempUsageDetail_20' ) start [2025-03-02 08:16:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589845', 'tblTempUsageDetail_20' ) end [2025-03-02 08:16:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:16:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:16:20] Production.INFO: ==23705== Releasing lock... [2025-03-02 08:16:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:16:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 08:17:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:17:05 [end_date_ymd] => 2025-03-02 08:17:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:17:05' and `end` < '2025-03-02 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-03-02 08:17:17] Production.INFO: count ==181 [2025-03-02 08:17:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:17:05 - End Time 2025-03-02 08:17:05 [2025-03-02 08:17:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589850', 'tblTempUsageDetail_20' ) start [2025-03-02 08:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589850', 'tblTempUsageDetail_20' ) end [2025-03-02 08:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589850', 'tblTempVendorCDR_20' ) start [2025-03-02 08:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589850', 'tblTempVendorCDR_20' ) end [2025-03-02 08:17:17] Production.INFO: ProcessCDR(1,14589850,1,1,2) [2025-03-02 08:17:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589850,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:17:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589850,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:17:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589850,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:17:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589850,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:17:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589850', 'tblTempUsageDetail_20' ) start [2025-03-02 08:17:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589850', 'tblTempUsageDetail_20' ) end [2025-03-02 08:17:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:17:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:17:20] Production.INFO: ==23782== Releasing lock... [2025-03-02 08:17:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:17:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 08:18:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:18:06 [end_date_ymd] => 2025-03-02 08:18:06 [RateCDR] => 1 ) [2025-03-02 08: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-03-02 05:18:06' and `end` < '2025-03-02 08: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-03-02 08:18:18] Production.INFO: count ==181 [2025-03-02 08:18:18] Production.ERROR: pbx CDR StartTime 2025-03-02 05:18:06 - End Time 2025-03-02 08:18:06 [2025-03-02 08:18:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589855', 'tblTempUsageDetail_20' ) start [2025-03-02 08:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589855', 'tblTempUsageDetail_20' ) end [2025-03-02 08:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589855', 'tblTempVendorCDR_20' ) start [2025-03-02 08:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589855', 'tblTempVendorCDR_20' ) end [2025-03-02 08:18:18] Production.INFO: ProcessCDR(1,14589855,1,1,2) [2025-03-02 08:18:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589855,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:18:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589855,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:18:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589855,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:18:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589855,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589855', 'tblTempUsageDetail_20' ) start [2025-03-02 08:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589855', 'tblTempUsageDetail_20' ) end [2025-03-02 08:18:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:18:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:18:21] Production.INFO: ==23875== Releasing lock... [2025-03-02 08:18:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:18:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 08:19:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:19:06 [end_date_ymd] => 2025-03-02 08:19:06 [RateCDR] => 1 ) [2025-03-02 08: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-03-02 05:19:06' and `end` < '2025-03-02 08: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-03-02 08:19:17] Production.INFO: count ==181 [2025-03-02 08:19:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:19:06 - End Time 2025-03-02 08:19:06 [2025-03-02 08:19:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589860', 'tblTempUsageDetail_20' ) start [2025-03-02 08:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589860', 'tblTempUsageDetail_20' ) end [2025-03-02 08:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589860', 'tblTempVendorCDR_20' ) start [2025-03-02 08:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589860', 'tblTempVendorCDR_20' ) end [2025-03-02 08:19:17] Production.INFO: ProcessCDR(1,14589860,1,1,2) [2025-03-02 08:19:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589860,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:19:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589860,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:19:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589860,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:19:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589860,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:19:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589860', 'tblTempUsageDetail_20' ) start [2025-03-02 08:19:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589860', 'tblTempUsageDetail_20' ) end [2025-03-02 08:19:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:19:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:19:21] Production.INFO: ==23966== Releasing lock... [2025-03-02 08:19:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:19:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 08:20:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:20:07 [end_date_ymd] => 2025-03-02 08:20:07 [RateCDR] => 1 ) [2025-03-02 08: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-03-02 05:20:07' and `end` < '2025-03-02 08: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-03-02 08:20:19] Production.INFO: count ==181 [2025-03-02 08:20:19] Production.ERROR: pbx CDR StartTime 2025-03-02 05:20:07 - End Time 2025-03-02 08:20:07 [2025-03-02 08:20:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:20:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589866', 'tblTempUsageDetail_20' ) start [2025-03-02 08:20:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589866', 'tblTempUsageDetail_20' ) end [2025-03-02 08:20:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589866', 'tblTempVendorCDR_20' ) start [2025-03-02 08:20:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589866', 'tblTempVendorCDR_20' ) end [2025-03-02 08:20:19] Production.INFO: ProcessCDR(1,14589866,1,1,2) [2025-03-02 08:20:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589866,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:20:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589866,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:20:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589866,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:20:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589866,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589866', 'tblTempUsageDetail_20' ) start [2025-03-02 08:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589866', 'tblTempUsageDetail_20' ) end [2025-03-02 08:20:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:20:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:20:22] Production.INFO: ==24052== Releasing lock... [2025-03-02 08:20:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:20:22] Production.INFO: 29 MB #Memory Used# [2025-03-02 08:21:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:21:05 [end_date_ymd] => 2025-03-02 08:21:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:21:05' and `end` < '2025-03-02 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-03-02 08:21:17] Production.INFO: count ==181 [2025-03-02 08:21:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:21:05 - End Time 2025-03-02 08:21:05 [2025-03-02 08:21:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589871', 'tblTempUsageDetail_20' ) start [2025-03-02 08:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589871', 'tblTempUsageDetail_20' ) end [2025-03-02 08:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589871', 'tblTempVendorCDR_20' ) start [2025-03-02 08:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589871', 'tblTempVendorCDR_20' ) end [2025-03-02 08:21:17] Production.INFO: ProcessCDR(1,14589871,1,1,2) [2025-03-02 08:21:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589871,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:21:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589871,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:21:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589871,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:21:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589871,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:21:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589871', 'tblTempUsageDetail_20' ) start [2025-03-02 08:21:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589871', 'tblTempUsageDetail_20' ) end [2025-03-02 08:21:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:21:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:21:20] Production.INFO: ==24135== Releasing lock... [2025-03-02 08:21:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:21:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 08:22:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:22:05 [end_date_ymd] => 2025-03-02 08:22:05 [RateCDR] => 1 ) [2025-03-02 08: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-03-02 05:22:05' and `end` < '2025-03-02 08: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-03-02 08:22:17] Production.INFO: count ==182 [2025-03-02 08:22:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:22:05 - End Time 2025-03-02 08:22:05 [2025-03-02 08:22:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589876', 'tblTempUsageDetail_20' ) start [2025-03-02 08:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589876', 'tblTempUsageDetail_20' ) end [2025-03-02 08:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589876', 'tblTempVendorCDR_20' ) start [2025-03-02 08:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589876', 'tblTempVendorCDR_20' ) end [2025-03-02 08:22:17] Production.INFO: ProcessCDR(1,14589876,1,1,2) [2025-03-02 08:22:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589876,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:22:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589876,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:22:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589876,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:22:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589876,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:22:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589876', 'tblTempUsageDetail_20' ) start [2025-03-02 08:22:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589876', 'tblTempUsageDetail_20' ) end [2025-03-02 08:22:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:22:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:22:22] Production.INFO: ==24221== Releasing lock... [2025-03-02 08:22:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:22:22] Production.INFO: 29 MB #Memory Used# [2025-03-02 08:23:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:23:05 [end_date_ymd] => 2025-03-02 08:23:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:23:05' and `end` < '2025-03-02 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-03-02 08:23:17] Production.INFO: count ==182 [2025-03-02 08:23:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:23:05 - End Time 2025-03-02 08:23:05 [2025-03-02 08:23:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589881', 'tblTempUsageDetail_20' ) start [2025-03-02 08:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589881', 'tblTempUsageDetail_20' ) end [2025-03-02 08:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589881', 'tblTempVendorCDR_20' ) start [2025-03-02 08:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589881', 'tblTempVendorCDR_20' ) end [2025-03-02 08:23:17] Production.INFO: ProcessCDR(1,14589881,1,1,2) [2025-03-02 08:23:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589881,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:23:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589881,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:23:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589881,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:23:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589881,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:23:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589881', 'tblTempUsageDetail_20' ) start [2025-03-02 08:23:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589881', 'tblTempUsageDetail_20' ) end [2025-03-02 08:23:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:23:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:23:20] Production.INFO: ==24327== Releasing lock... [2025-03-02 08:23:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:23:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 08:24:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:24:06 [end_date_ymd] => 2025-03-02 08:24:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:24:06' and `end` < '2025-03-02 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-03-02 08:24:18] Production.INFO: count ==182 [2025-03-02 08:24:18] Production.ERROR: pbx CDR StartTime 2025-03-02 05:24:06 - End Time 2025-03-02 08:24:06 [2025-03-02 08:24:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589886', 'tblTempUsageDetail_20' ) start [2025-03-02 08:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589886', 'tblTempUsageDetail_20' ) end [2025-03-02 08:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589886', 'tblTempVendorCDR_20' ) start [2025-03-02 08:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589886', 'tblTempVendorCDR_20' ) end [2025-03-02 08:24:18] Production.INFO: ProcessCDR(1,14589886,1,1,2) [2025-03-02 08:24:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589886,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:24:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589886,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:24:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589886,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:24:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589886,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589886', 'tblTempUsageDetail_20' ) start [2025-03-02 08:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589886', 'tblTempUsageDetail_20' ) end [2025-03-02 08:24:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:24:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:24:21] Production.INFO: ==24475== Releasing lock... [2025-03-02 08:24:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:24:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 08:25:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:25:05 [end_date_ymd] => 2025-03-02 08:25:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:25:05' and `end` < '2025-03-02 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-03-02 08:25:17] Production.INFO: count ==182 [2025-03-02 08:25:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:25:05 - End Time 2025-03-02 08:25:05 [2025-03-02 08:25:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589891', 'tblTempUsageDetail_20' ) start [2025-03-02 08:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589891', 'tblTempUsageDetail_20' ) end [2025-03-02 08:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589891', 'tblTempVendorCDR_20' ) start [2025-03-02 08:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589891', 'tblTempVendorCDR_20' ) end [2025-03-02 08:25:17] Production.INFO: ProcessCDR(1,14589891,1,1,2) [2025-03-02 08:25:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589891,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:25:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589891,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:25:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589891,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:25:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589891,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589891', 'tblTempUsageDetail_20' ) start [2025-03-02 08:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589891', 'tblTempUsageDetail_20' ) end [2025-03-02 08:25:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:25:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:25:21] Production.INFO: ==24570== Releasing lock... [2025-03-02 08:25:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:25:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 08:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:26:05 [end_date_ymd] => 2025-03-02 08:26:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:26:05' and `end` < '2025-03-02 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-03-02 08:26:17] Production.INFO: count ==182 [2025-03-02 08:26:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:26:05 - End Time 2025-03-02 08:26:05 [2025-03-02 08:26:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589896', 'tblTempUsageDetail_20' ) start [2025-03-02 08:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589896', 'tblTempUsageDetail_20' ) end [2025-03-02 08:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589896', 'tblTempVendorCDR_20' ) start [2025-03-02 08:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589896', 'tblTempVendorCDR_20' ) end [2025-03-02 08:26:17] Production.INFO: ProcessCDR(1,14589896,1,1,2) [2025-03-02 08:26:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589896,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:26:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589896,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:26:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589896,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:26:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589896,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:26:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589896', 'tblTempUsageDetail_20' ) start [2025-03-02 08:26:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589896', 'tblTempUsageDetail_20' ) end [2025-03-02 08:26:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:26:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:26:21] Production.INFO: ==24675== Releasing lock... [2025-03-02 08:26:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:26:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 08:27:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:27:05 [end_date_ymd] => 2025-03-02 08:27:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:27:05' and `end` < '2025-03-02 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-03-02 08:27:17] Production.INFO: count ==183 [2025-03-02 08:27:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:27:05 - End Time 2025-03-02 08:27:05 [2025-03-02 08:27:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589901', 'tblTempUsageDetail_20' ) start [2025-03-02 08:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589901', 'tblTempUsageDetail_20' ) end [2025-03-02 08:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589901', 'tblTempVendorCDR_20' ) start [2025-03-02 08:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589901', 'tblTempVendorCDR_20' ) end [2025-03-02 08:27:17] Production.INFO: ProcessCDR(1,14589901,1,1,2) [2025-03-02 08:27:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589901,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:27:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589901,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:27:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589901,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:27:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589901,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:27:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589901', 'tblTempUsageDetail_20' ) start [2025-03-02 08:27:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589901', 'tblTempUsageDetail_20' ) end [2025-03-02 08:27:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:27:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:27:21] Production.INFO: ==24771== Releasing lock... [2025-03-02 08:27:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:27:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 08:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:28:05 [end_date_ymd] => 2025-03-02 08:28:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:28:05' and `end` < '2025-03-02 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-03-02 08:28:18] Production.INFO: count ==187 [2025-03-02 08:28:18] Production.ERROR: pbx CDR StartTime 2025-03-02 05:28:05 - End Time 2025-03-02 08:28:05 [2025-03-02 08:28:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589906', 'tblTempUsageDetail_20' ) start [2025-03-02 08:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589906', 'tblTempUsageDetail_20' ) end [2025-03-02 08:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589906', 'tblTempVendorCDR_20' ) start [2025-03-02 08:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589906', 'tblTempVendorCDR_20' ) end [2025-03-02 08:28:18] Production.INFO: ProcessCDR(1,14589906,1,1,2) [2025-03-02 08:28:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589906,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:28:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589906,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:28:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589906,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:28:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589906,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:28:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589906', 'tblTempUsageDetail_20' ) start [2025-03-02 08:28:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589906', 'tblTempUsageDetail_20' ) end [2025-03-02 08:28:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:28:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:28:21] Production.INFO: ==24864== Releasing lock... [2025-03-02 08:28:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:28:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 08:29:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:29:05 [end_date_ymd] => 2025-03-02 08:29:05 [RateCDR] => 1 ) [2025-03-02 08: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-03-02 05:29:05' and `end` < '2025-03-02 08: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-03-02 08:29:17] Production.INFO: count ==192 [2025-03-02 08:29:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:29:05 - End Time 2025-03-02 08:29:05 [2025-03-02 08:29:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589911', 'tblTempUsageDetail_20' ) start [2025-03-02 08:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589911', 'tblTempUsageDetail_20' ) end [2025-03-02 08:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589911', 'tblTempVendorCDR_20' ) start [2025-03-02 08:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589911', 'tblTempVendorCDR_20' ) end [2025-03-02 08:29:17] Production.INFO: ProcessCDR(1,14589911,1,1,2) [2025-03-02 08:29:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589911,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:29:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589911,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:29:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589911,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:29:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589911,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:29:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589911', 'tblTempUsageDetail_20' ) start [2025-03-02 08:29:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589911', 'tblTempUsageDetail_20' ) end [2025-03-02 08:29:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:29:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:29:20] Production.INFO: ==24950== Releasing lock... [2025-03-02 08:29:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:29:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 08:30:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:30:06 [end_date_ymd] => 2025-03-02 08:30:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:30:06' and `end` < '2025-03-02 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-03-02 08:30:18] Production.INFO: count ==199 [2025-03-02 08:30:18] Production.ERROR: pbx CDR StartTime 2025-03-02 05:30:06 - End Time 2025-03-02 08:30:06 [2025-03-02 08:30:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589917', 'tblTempUsageDetail_20' ) start [2025-03-02 08:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589917', 'tblTempUsageDetail_20' ) end [2025-03-02 08:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589917', 'tblTempVendorCDR_20' ) start [2025-03-02 08:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589917', 'tblTempVendorCDR_20' ) end [2025-03-02 08:30:18] Production.INFO: ProcessCDR(1,14589917,1,1,2) [2025-03-02 08:30:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589917,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:30:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589917,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:30:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589917,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:30:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589917,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:30:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589917', 'tblTempUsageDetail_20' ) start [2025-03-02 08:30:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589917', 'tblTempUsageDetail_20' ) end [2025-03-02 08:30:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:30:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:30:22] Production.INFO: ==25044== Releasing lock... [2025-03-02 08:30:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:30:22] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 08:31:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:31:05 [end_date_ymd] => 2025-03-02 08:31:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:31:05' and `end` < '2025-03-02 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-03-02 08:31:17] Production.INFO: count ==199 [2025-03-02 08:31:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:31:05 - End Time 2025-03-02 08:31:05 [2025-03-02 08:31:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589922', 'tblTempUsageDetail_20' ) start [2025-03-02 08:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589922', 'tblTempUsageDetail_20' ) end [2025-03-02 08:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589922', 'tblTempVendorCDR_20' ) start [2025-03-02 08:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589922', 'tblTempVendorCDR_20' ) end [2025-03-02 08:31:17] Production.INFO: ProcessCDR(1,14589922,1,1,2) [2025-03-02 08:31:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589922,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:31:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589922,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:31:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589922,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:31:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589922,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:31:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589922', 'tblTempUsageDetail_20' ) start [2025-03-02 08:31:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589922', 'tblTempUsageDetail_20' ) end [2025-03-02 08:31:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:31:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:31:20] Production.INFO: ==25123== Releasing lock... [2025-03-02 08:31:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:31:20] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 08:32:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:32:05 [end_date_ymd] => 2025-03-02 08:32:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:32:05' and `end` < '2025-03-02 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-03-02 08:32:17] Production.INFO: count ==199 [2025-03-02 08:32:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:32:05 - End Time 2025-03-02 08:32:05 [2025-03-02 08:32:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589927', 'tblTempUsageDetail_20' ) start [2025-03-02 08:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589927', 'tblTempUsageDetail_20' ) end [2025-03-02 08:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589927', 'tblTempVendorCDR_20' ) start [2025-03-02 08:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589927', 'tblTempVendorCDR_20' ) end [2025-03-02 08:32:17] Production.INFO: ProcessCDR(1,14589927,1,1,2) [2025-03-02 08:32:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589927,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:32:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589927,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:32:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589927,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:32:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589927,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:32:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589927', 'tblTempUsageDetail_20' ) start [2025-03-02 08:32:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589927', 'tblTempUsageDetail_20' ) end [2025-03-02 08:32:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:32:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:32:20] Production.INFO: ==25199== Releasing lock... [2025-03-02 08:32:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:32:20] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 08:33:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:33:05 [end_date_ymd] => 2025-03-02 08:33:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:33:05' and `end` < '2025-03-02 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-03-02 08:33:17] Production.INFO: count ==199 [2025-03-02 08:33:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:33:05 - End Time 2025-03-02 08:33:05 [2025-03-02 08:33:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589932', 'tblTempUsageDetail_20' ) start [2025-03-02 08:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589932', 'tblTempUsageDetail_20' ) end [2025-03-02 08:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589932', 'tblTempVendorCDR_20' ) start [2025-03-02 08:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589932', 'tblTempVendorCDR_20' ) end [2025-03-02 08:33:17] Production.INFO: ProcessCDR(1,14589932,1,1,2) [2025-03-02 08:33:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589932,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:33:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589932,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:33:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589932,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:33:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589932,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:33:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589932', 'tblTempUsageDetail_20' ) start [2025-03-02 08:33:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589932', 'tblTempUsageDetail_20' ) end [2025-03-02 08:33:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:33:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:33:20] Production.INFO: ==25284== Releasing lock... [2025-03-02 08:33:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:33:20] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 08:34:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:34:05 [end_date_ymd] => 2025-03-02 08:34:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:34:05' and `end` < '2025-03-02 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-03-02 08:34:17] Production.INFO: count ==199 [2025-03-02 08:34:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:34:05 - End Time 2025-03-02 08:34:05 [2025-03-02 08:34:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589937', 'tblTempUsageDetail_20' ) start [2025-03-02 08:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589937', 'tblTempUsageDetail_20' ) end [2025-03-02 08:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589937', 'tblTempVendorCDR_20' ) start [2025-03-02 08:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589937', 'tblTempVendorCDR_20' ) end [2025-03-02 08:34:17] Production.INFO: ProcessCDR(1,14589937,1,1,2) [2025-03-02 08:34:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589937,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:34:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589937,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:34:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589937,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:34:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589937,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:34:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589937', 'tblTempUsageDetail_20' ) start [2025-03-02 08:34:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589937', 'tblTempUsageDetail_20' ) end [2025-03-02 08:34:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:34:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:34:21] Production.INFO: ==25375== Releasing lock... [2025-03-02 08:34:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:34:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 08:35:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:35:05 [end_date_ymd] => 2025-03-02 08:35:05 [RateCDR] => 1 ) [2025-03-02 08: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-03-02 05:35:05' and `end` < '2025-03-02 08: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-03-02 08:35:17] Production.INFO: count ==199 [2025-03-02 08:35:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:35:05 - End Time 2025-03-02 08:35:05 [2025-03-02 08:35:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589942', 'tblTempUsageDetail_20' ) start [2025-03-02 08:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589942', 'tblTempUsageDetail_20' ) end [2025-03-02 08:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589942', 'tblTempVendorCDR_20' ) start [2025-03-02 08:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589942', 'tblTempVendorCDR_20' ) end [2025-03-02 08:35:17] Production.INFO: ProcessCDR(1,14589942,1,1,2) [2025-03-02 08:35:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589942,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:35:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589942,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:35:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589942,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:35:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589942,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:35:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589942', 'tblTempUsageDetail_20' ) start [2025-03-02 08:35:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589942', 'tblTempUsageDetail_20' ) end [2025-03-02 08:35:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:35:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:35:21] Production.INFO: ==25476== Releasing lock... [2025-03-02 08:35:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:35:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 08:36:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:36:05 [end_date_ymd] => 2025-03-02 08:36:05 [RateCDR] => 1 ) [2025-03-02 08: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-03-02 05:36:05' and `end` < '2025-03-02 08: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-03-02 08:36:17] Production.INFO: count ==199 [2025-03-02 08:36:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:36:05 - End Time 2025-03-02 08:36:05 [2025-03-02 08:36:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589947', 'tblTempUsageDetail_20' ) start [2025-03-02 08:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589947', 'tblTempUsageDetail_20' ) end [2025-03-02 08:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589947', 'tblTempVendorCDR_20' ) start [2025-03-02 08:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589947', 'tblTempVendorCDR_20' ) end [2025-03-02 08:36:17] Production.INFO: ProcessCDR(1,14589947,1,1,2) [2025-03-02 08:36:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589947,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:36:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589947,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:36:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589947,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:36:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589947,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:36:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589947', 'tblTempUsageDetail_20' ) start [2025-03-02 08:36:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589947', 'tblTempUsageDetail_20' ) end [2025-03-02 08:36:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:36:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:36:20] Production.INFO: ==25561== Releasing lock... [2025-03-02 08:36:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:36:20] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 08:37:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:37:05 [end_date_ymd] => 2025-03-02 08:37:05 [RateCDR] => 1 ) [2025-03-02 08: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-03-02 05:37:05' and `end` < '2025-03-02 08: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-03-02 08:37:17] Production.INFO: count ==200 [2025-03-02 08:37:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:37:05 - End Time 2025-03-02 08:37:05 [2025-03-02 08:37:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589952', 'tblTempUsageDetail_20' ) start [2025-03-02 08:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589952', 'tblTempUsageDetail_20' ) end [2025-03-02 08:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589952', 'tblTempVendorCDR_20' ) start [2025-03-02 08:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589952', 'tblTempVendorCDR_20' ) end [2025-03-02 08:37:17] Production.INFO: ProcessCDR(1,14589952,1,1,2) [2025-03-02 08:37:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589952,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:37:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589952,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:37:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589952,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:37:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589952,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589952', 'tblTempUsageDetail_20' ) start [2025-03-02 08:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589952', 'tblTempUsageDetail_20' ) end [2025-03-02 08:37:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:37:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:37:22] Production.INFO: ==25649== Releasing lock... [2025-03-02 08:37:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:37:22] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 08:38:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:38:05 [end_date_ymd] => 2025-03-02 08:38:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:38:05' and `end` < '2025-03-02 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-03-02 08:38:17] Production.INFO: count ==200 [2025-03-02 08:38:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:38:05 - End Time 2025-03-02 08:38:05 [2025-03-02 08:38:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589957', 'tblTempUsageDetail_20' ) start [2025-03-02 08:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589957', 'tblTempUsageDetail_20' ) end [2025-03-02 08:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589957', 'tblTempVendorCDR_20' ) start [2025-03-02 08:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589957', 'tblTempVendorCDR_20' ) end [2025-03-02 08:38:17] Production.INFO: ProcessCDR(1,14589957,1,1,2) [2025-03-02 08:38:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589957,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:38:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589957,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:38:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589957,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:38:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589957,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589957', 'tblTempUsageDetail_20' ) start [2025-03-02 08:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589957', 'tblTempUsageDetail_20' ) end [2025-03-02 08:38:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:38:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:38:21] Production.INFO: ==25747== Releasing lock... [2025-03-02 08:38:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:38:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 08:39:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:39:05 [end_date_ymd] => 2025-03-02 08:39:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:39:05' and `end` < '2025-03-02 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-03-02 08:39:17] Production.INFO: count ==200 [2025-03-02 08:39:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:39:05 - End Time 2025-03-02 08:39:05 [2025-03-02 08:39:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589962', 'tblTempUsageDetail_20' ) start [2025-03-02 08:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589962', 'tblTempUsageDetail_20' ) end [2025-03-02 08:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589962', 'tblTempVendorCDR_20' ) start [2025-03-02 08:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589962', 'tblTempVendorCDR_20' ) end [2025-03-02 08:39:17] Production.INFO: ProcessCDR(1,14589962,1,1,2) [2025-03-02 08:39:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589962,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:39:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589962,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:39:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589962,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:39:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589962,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:39:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589962', 'tblTempUsageDetail_20' ) start [2025-03-02 08:39:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589962', 'tblTempUsageDetail_20' ) end [2025-03-02 08:39:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:39:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:39:21] Production.INFO: ==25873== Releasing lock... [2025-03-02 08:39:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:39:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 08:40:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:40:06 [end_date_ymd] => 2025-03-02 08:40:06 [RateCDR] => 1 ) [2025-03-02 08: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-03-02 05:40:06' and `end` < '2025-03-02 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-03-02 08:40:18] Production.INFO: count ==202 [2025-03-02 08:40:18] Production.ERROR: pbx CDR StartTime 2025-03-02 05:40:06 - End Time 2025-03-02 08:40:06 [2025-03-02 08:40:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589968', 'tblTempUsageDetail_20' ) start [2025-03-02 08:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589968', 'tblTempUsageDetail_20' ) end [2025-03-02 08:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589968', 'tblTempVendorCDR_20' ) start [2025-03-02 08:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589968', 'tblTempVendorCDR_20' ) end [2025-03-02 08:40:18] Production.INFO: ProcessCDR(1,14589968,1,1,2) [2025-03-02 08:40:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589968,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:40:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589968,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:40:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589968,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:40:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589968,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:40:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589968', 'tblTempUsageDetail_20' ) start [2025-03-02 08:40:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589968', 'tblTempUsageDetail_20' ) end [2025-03-02 08:40:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:40:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:40:21] Production.INFO: ==25952== Releasing lock... [2025-03-02 08:40:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:40:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 08:41:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:41:05 [end_date_ymd] => 2025-03-02 08:41:05 [RateCDR] => 1 ) [2025-03-02 08: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-03-02 05:41:05' and `end` < '2025-03-02 08: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-03-02 08:41:17] Production.INFO: count ==202 [2025-03-02 08:41:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:41:05 - End Time 2025-03-02 08:41:05 [2025-03-02 08:41:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589973', 'tblTempUsageDetail_20' ) start [2025-03-02 08:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589973', 'tblTempUsageDetail_20' ) end [2025-03-02 08:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589973', 'tblTempVendorCDR_20' ) start [2025-03-02 08:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589973', 'tblTempVendorCDR_20' ) end [2025-03-02 08:41:17] Production.INFO: ProcessCDR(1,14589973,1,1,2) [2025-03-02 08:41:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589973,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:41:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589973,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:41:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589973,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:41:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589973,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:41:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589973', 'tblTempUsageDetail_20' ) start [2025-03-02 08:41:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589973', 'tblTempUsageDetail_20' ) end [2025-03-02 08:41:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:41:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:41:20] Production.INFO: ==26031== Releasing lock... [2025-03-02 08:41:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:41:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 08:42:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:42:05 [end_date_ymd] => 2025-03-02 08:42:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:42:05' and `end` < '2025-03-02 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-03-02 08:42:17] Production.INFO: count ==202 [2025-03-02 08:42:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:42:05 - End Time 2025-03-02 08:42:05 [2025-03-02 08:42:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589978', 'tblTempUsageDetail_20' ) start [2025-03-02 08:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589978', 'tblTempUsageDetail_20' ) end [2025-03-02 08:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589978', 'tblTempVendorCDR_20' ) start [2025-03-02 08:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589978', 'tblTempVendorCDR_20' ) end [2025-03-02 08:42:17] Production.INFO: ProcessCDR(1,14589978,1,1,2) [2025-03-02 08:42:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589978,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:42:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589978,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:42:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589978,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:42:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589978,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:42:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589978', 'tblTempUsageDetail_20' ) start [2025-03-02 08:42:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589978', 'tblTempUsageDetail_20' ) end [2025-03-02 08:42:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:42:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:42:20] Production.INFO: ==26110== Releasing lock... [2025-03-02 08:42:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:42:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 08:43:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:43:05 [end_date_ymd] => 2025-03-02 08:43:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:43:05' and `end` < '2025-03-02 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-03-02 08:43:17] Production.INFO: count ==202 [2025-03-02 08:43:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:43:05 - End Time 2025-03-02 08:43:05 [2025-03-02 08:43:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589983', 'tblTempUsageDetail_20' ) start [2025-03-02 08:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589983', 'tblTempUsageDetail_20' ) end [2025-03-02 08:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589983', 'tblTempVendorCDR_20' ) start [2025-03-02 08:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589983', 'tblTempVendorCDR_20' ) end [2025-03-02 08:43:17] Production.INFO: ProcessCDR(1,14589983,1,1,2) [2025-03-02 08:43:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589983,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:43:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589983,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:43:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589983,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:43:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589983,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:43:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589983', 'tblTempUsageDetail_20' ) start [2025-03-02 08:43:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589983', 'tblTempUsageDetail_20' ) end [2025-03-02 08:43:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:43:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:43:20] Production.INFO: ==26193== Releasing lock... [2025-03-02 08:43:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:43:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 08:44:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:44:04 [end_date_ymd] => 2025-03-02 08:44:04 [RateCDR] => 1 ) [2025-03-02 08: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-03-02 05:44:04' and `end` < '2025-03-02 08: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-03-02 08:44:16] Production.INFO: count ==206 [2025-03-02 08:44:16] Production.ERROR: pbx CDR StartTime 2025-03-02 05:44:04 - End Time 2025-03-02 08:44:04 [2025-03-02 08:44:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589988', 'tblTempUsageDetail_20' ) start [2025-03-02 08:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589988', 'tblTempUsageDetail_20' ) end [2025-03-02 08:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589988', 'tblTempVendorCDR_20' ) start [2025-03-02 08:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589988', 'tblTempVendorCDR_20' ) end [2025-03-02 08:44:16] Production.INFO: ProcessCDR(1,14589988,1,1,2) [2025-03-02 08:44:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589988,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:44:17] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589988,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:44:17] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589988,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:44:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589988,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:44:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589988', 'tblTempUsageDetail_20' ) start [2025-03-02 08:44:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589988', 'tblTempUsageDetail_20' ) end [2025-03-02 08:44:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:44:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:44:20] Production.INFO: ==26276== Releasing lock... [2025-03-02 08:44:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:44:20] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 08:45:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:45:05 [end_date_ymd] => 2025-03-02 08:45:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:45:05' and `end` < '2025-03-02 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-03-02 08:45:17] Production.INFO: count ==206 [2025-03-02 08:45:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:45:05 - End Time 2025-03-02 08:45:05 [2025-03-02 08:45:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589993', 'tblTempUsageDetail_20' ) start [2025-03-02 08:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589993', 'tblTempUsageDetail_20' ) end [2025-03-02 08:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589993', 'tblTempVendorCDR_20' ) start [2025-03-02 08:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589993', 'tblTempVendorCDR_20' ) end [2025-03-02 08:45:17] Production.INFO: ProcessCDR(1,14589993,1,1,2) [2025-03-02 08:45:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589993,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:45:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589993,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:45:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589993,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:45:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589993,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:45:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589993', 'tblTempUsageDetail_20' ) start [2025-03-02 08:45:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589993', 'tblTempUsageDetail_20' ) end [2025-03-02 08:45:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:45:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:45:21] Production.INFO: ==26360== Releasing lock... [2025-03-02 08:45:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:45:21] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 08:46:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:46:06 [end_date_ymd] => 2025-03-02 08:46:06 [RateCDR] => 1 ) [2025-03-02 08: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-03-02 05:46:06' and `end` < '2025-03-02 08: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-03-02 08:46:18] Production.INFO: count ==206 [2025-03-02 08:46:18] Production.ERROR: pbx CDR StartTime 2025-03-02 05:46:06 - End Time 2025-03-02 08:46:06 [2025-03-02 08:46:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589998', 'tblTempUsageDetail_20' ) start [2025-03-02 08:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14589998', 'tblTempUsageDetail_20' ) end [2025-03-02 08:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589998', 'tblTempVendorCDR_20' ) start [2025-03-02 08:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14589998', 'tblTempVendorCDR_20' ) end [2025-03-02 08:46:18] Production.INFO: ProcessCDR(1,14589998,1,1,2) [2025-03-02 08:46:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14589998,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:46:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14589998,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:46:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14589998,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:46:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14589998,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589998', 'tblTempUsageDetail_20' ) start [2025-03-02 08:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14589998', 'tblTempUsageDetail_20' ) end [2025-03-02 08:46:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:46:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:46:21] Production.INFO: ==26445== Releasing lock... [2025-03-02 08:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:46:21] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 08:47:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:47:05 [end_date_ymd] => 2025-03-02 08:47:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:47:05' and `end` < '2025-03-02 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-03-02 08:47:17] Production.INFO: count ==206 [2025-03-02 08:47:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:47:05 - End Time 2025-03-02 08:47:05 [2025-03-02 08:47:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590003', 'tblTempUsageDetail_20' ) start [2025-03-02 08:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590003', 'tblTempUsageDetail_20' ) end [2025-03-02 08:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590003', 'tblTempVendorCDR_20' ) start [2025-03-02 08:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590003', 'tblTempVendorCDR_20' ) end [2025-03-02 08:47:17] Production.INFO: ProcessCDR(1,14590003,1,1,2) [2025-03-02 08:47:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590003,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:47:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590003,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:47:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590003,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:47:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590003,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:47:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590003', 'tblTempUsageDetail_20' ) start [2025-03-02 08:47:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590003', 'tblTempUsageDetail_20' ) end [2025-03-02 08:47:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:47:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:47:20] Production.INFO: ==26542== Releasing lock... [2025-03-02 08:47:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:47:20] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 08:48:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:48:06 [end_date_ymd] => 2025-03-02 08:48:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:48:06' and `end` < '2025-03-02 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-03-02 08:48:17] Production.INFO: count ==206 [2025-03-02 08:48:18] Production.ERROR: pbx CDR StartTime 2025-03-02 05:48:06 - End Time 2025-03-02 08:48:06 [2025-03-02 08:48:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590008', 'tblTempUsageDetail_20' ) start [2025-03-02 08:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590008', 'tblTempUsageDetail_20' ) end [2025-03-02 08:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590008', 'tblTempVendorCDR_20' ) start [2025-03-02 08:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590008', 'tblTempVendorCDR_20' ) end [2025-03-02 08:48:18] Production.INFO: ProcessCDR(1,14590008,1,1,2) [2025-03-02 08:48:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590008,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:48:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590008,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:48:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590008,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:48:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590008,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:48:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590008', 'tblTempUsageDetail_20' ) start [2025-03-02 08:48:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590008', 'tblTempUsageDetail_20' ) end [2025-03-02 08:48:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:48:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:48:21] Production.INFO: ==26632== Releasing lock... [2025-03-02 08:48:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:48:21] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 08:49:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:49:05 [end_date_ymd] => 2025-03-02 08:49:05 [RateCDR] => 1 ) [2025-03-02 08: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-03-02 05:49:05' and `end` < '2025-03-02 08: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-03-02 08:49:16] Production.INFO: count ==206 [2025-03-02 08:49:16] Production.ERROR: pbx CDR StartTime 2025-03-02 05:49:05 - End Time 2025-03-02 08:49:05 [2025-03-02 08:49:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590013', 'tblTempUsageDetail_20' ) start [2025-03-02 08:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590013', 'tblTempUsageDetail_20' ) end [2025-03-02 08:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590013', 'tblTempVendorCDR_20' ) start [2025-03-02 08:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590013', 'tblTempVendorCDR_20' ) end [2025-03-02 08:49:16] Production.INFO: ProcessCDR(1,14590013,1,1,2) [2025-03-02 08:49:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590013,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:49:17] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590013,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:49:17] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590013,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:49:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590013,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:49:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590013', 'tblTempUsageDetail_20' ) start [2025-03-02 08:49:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590013', 'tblTempUsageDetail_20' ) end [2025-03-02 08:49:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:49:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:49:20] Production.INFO: ==26718== Releasing lock... [2025-03-02 08:49:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:49:20] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 08:50:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:50:06 [end_date_ymd] => 2025-03-02 08:50:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:50:06' and `end` < '2025-03-02 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-03-02 08:50:18] Production.INFO: count ==208 [2025-03-02 08:50:18] Production.ERROR: pbx CDR StartTime 2025-03-02 05:50:06 - End Time 2025-03-02 08:50:06 [2025-03-02 08:50:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590019', 'tblTempUsageDetail_20' ) start [2025-03-02 08:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590019', 'tblTempUsageDetail_20' ) end [2025-03-02 08:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590019', 'tblTempVendorCDR_20' ) start [2025-03-02 08:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590019', 'tblTempVendorCDR_20' ) end [2025-03-02 08:50:18] Production.INFO: ProcessCDR(1,14590019,1,1,2) [2025-03-02 08:50:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590019,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:50:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590019,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:50:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590019,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:50:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590019,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:50:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590019', 'tblTempUsageDetail_20' ) start [2025-03-02 08:50:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590019', 'tblTempUsageDetail_20' ) end [2025-03-02 08:50:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:50:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:50:22] Production.INFO: ==26800== Releasing lock... [2025-03-02 08:50:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:50:22] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 08:51:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:51:05 [end_date_ymd] => 2025-03-02 08:51:05 [RateCDR] => 1 ) [2025-03-02 08: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-03-02 05:51:05' and `end` < '2025-03-02 08: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-03-02 08:51:17] Production.INFO: count ==208 [2025-03-02 08:51:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:51:05 - End Time 2025-03-02 08:51:05 [2025-03-02 08:51:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590024', 'tblTempUsageDetail_20' ) start [2025-03-02 08:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590024', 'tblTempUsageDetail_20' ) end [2025-03-02 08:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590024', 'tblTempVendorCDR_20' ) start [2025-03-02 08:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590024', 'tblTempVendorCDR_20' ) end [2025-03-02 08:51:17] Production.INFO: ProcessCDR(1,14590024,1,1,2) [2025-03-02 08:51:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590024,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:51:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590024,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:51:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590024,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:51:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590024,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:51:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590024', 'tblTempUsageDetail_20' ) start [2025-03-02 08:51:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590024', 'tblTempUsageDetail_20' ) end [2025-03-02 08:51:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:51:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:51:20] Production.INFO: ==26883== Releasing lock... [2025-03-02 08:51:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:51:20] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 08:52:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:52:06 [end_date_ymd] => 2025-03-02 08:52:06 [RateCDR] => 1 ) [2025-03-02 08: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-03-02 05:52:06' and `end` < '2025-03-02 08: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-03-02 08:52:18] Production.INFO: count ==208 [2025-03-02 08:52:18] Production.ERROR: pbx CDR StartTime 2025-03-02 05:52:06 - End Time 2025-03-02 08:52:06 [2025-03-02 08:52:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590029', 'tblTempUsageDetail_20' ) start [2025-03-02 08:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590029', 'tblTempUsageDetail_20' ) end [2025-03-02 08:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590029', 'tblTempVendorCDR_20' ) start [2025-03-02 08:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590029', 'tblTempVendorCDR_20' ) end [2025-03-02 08:52:18] Production.INFO: ProcessCDR(1,14590029,1,1,2) [2025-03-02 08:52:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590029,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:52:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590029,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:52:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590029,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:52:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590029,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:52:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590029', 'tblTempUsageDetail_20' ) start [2025-03-02 08:52:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590029', 'tblTempUsageDetail_20' ) end [2025-03-02 08:52:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:52:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:52:22] Production.INFO: ==26958== Releasing lock... [2025-03-02 08:52:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:52:22] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 08:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:53:05 [end_date_ymd] => 2025-03-02 08:53:05 [RateCDR] => 1 ) [2025-03-02 08: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-03-02 05:53:05' and `end` < '2025-03-02 08: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-03-02 08:53:17] Production.INFO: count ==208 [2025-03-02 08:53:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:53:05 - End Time 2025-03-02 08:53:05 [2025-03-02 08:53:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590034', 'tblTempUsageDetail_20' ) start [2025-03-02 08:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590034', 'tblTempUsageDetail_20' ) end [2025-03-02 08:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590034', 'tblTempVendorCDR_20' ) start [2025-03-02 08:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590034', 'tblTempVendorCDR_20' ) end [2025-03-02 08:53:17] Production.INFO: ProcessCDR(1,14590034,1,1,2) [2025-03-02 08:53:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590034,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:53:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590034,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:53:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590034,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:53:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590034,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:53:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590034', 'tblTempUsageDetail_20' ) start [2025-03-02 08:53:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590034', 'tblTempUsageDetail_20' ) end [2025-03-02 08:53:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:53:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:53:20] Production.INFO: ==27035== Releasing lock... [2025-03-02 08:53:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:53:20] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 08:54:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:54:05 [end_date_ymd] => 2025-03-02 08:54:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:54:05' and `end` < '2025-03-02 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-03-02 08:54:17] Production.INFO: count ==208 [2025-03-02 08:54:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:54:05 - End Time 2025-03-02 08:54:05 [2025-03-02 08:54:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590039', 'tblTempUsageDetail_20' ) start [2025-03-02 08:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590039', 'tblTempUsageDetail_20' ) end [2025-03-02 08:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590039', 'tblTempVendorCDR_20' ) start [2025-03-02 08:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590039', 'tblTempVendorCDR_20' ) end [2025-03-02 08:54:17] Production.INFO: ProcessCDR(1,14590039,1,1,2) [2025-03-02 08:54:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590039,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:54:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590039,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:54:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590039,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:54:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590039,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:54:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590039', 'tblTempUsageDetail_20' ) start [2025-03-02 08:54:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590039', 'tblTempUsageDetail_20' ) end [2025-03-02 08:54:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:54:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:54:21] Production.INFO: ==27157== Releasing lock... [2025-03-02 08:54:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:54:21] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 08:55:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:55:04 [end_date_ymd] => 2025-03-02 08:55:04 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:55:04' and `end` < '2025-03-02 08:55: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-03-02 08:55:16] Production.INFO: count ==208 [2025-03-02 08:55:16] Production.ERROR: pbx CDR StartTime 2025-03-02 05:55:04 - End Time 2025-03-02 08:55:04 [2025-03-02 08:55:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590044', 'tblTempUsageDetail_20' ) start [2025-03-02 08:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590044', 'tblTempUsageDetail_20' ) end [2025-03-02 08:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590044', 'tblTempVendorCDR_20' ) start [2025-03-02 08:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590044', 'tblTempVendorCDR_20' ) end [2025-03-02 08:55:16] Production.INFO: ProcessCDR(1,14590044,1,1,2) [2025-03-02 08:55:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590044,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:55:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590044,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:55:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590044,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:55:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590044,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:55:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590044', 'tblTempUsageDetail_20' ) start [2025-03-02 08:55:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590044', 'tblTempUsageDetail_20' ) end [2025-03-02 08:55:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:55:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:55:20] Production.INFO: ==27230== Releasing lock... [2025-03-02 08:55:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:55:20] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 08:56:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:56:05 [end_date_ymd] => 2025-03-02 08:56:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:56:05' and `end` < '2025-03-02 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-03-02 08:56:17] Production.INFO: count ==208 [2025-03-02 08:56:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:56:05 - End Time 2025-03-02 08:56:05 [2025-03-02 08:56:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590049', 'tblTempUsageDetail_20' ) start [2025-03-02 08:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590049', 'tblTempUsageDetail_20' ) end [2025-03-02 08:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590049', 'tblTempVendorCDR_20' ) start [2025-03-02 08:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590049', 'tblTempVendorCDR_20' ) end [2025-03-02 08:56:17] Production.INFO: ProcessCDR(1,14590049,1,1,2) [2025-03-02 08:56:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590049,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:56:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590049,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:56:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590049,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:56:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590049,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:56:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590049', 'tblTempUsageDetail_20' ) start [2025-03-02 08:56:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590049', 'tblTempUsageDetail_20' ) end [2025-03-02 08:56:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:56:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:56:20] Production.INFO: ==27306== Releasing lock... [2025-03-02 08:56:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:56:20] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 08:57:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:57:05 [end_date_ymd] => 2025-03-02 08:57:05 [RateCDR] => 1 ) [2025-03-02 08: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-03-02 05:57:05' and `end` < '2025-03-02 08: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-03-02 08:57:16] Production.INFO: count ==208 [2025-03-02 08:57:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:57:05 - End Time 2025-03-02 08:57:05 [2025-03-02 08:57:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590054', 'tblTempUsageDetail_20' ) start [2025-03-02 08:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590054', 'tblTempUsageDetail_20' ) end [2025-03-02 08:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590054', 'tblTempVendorCDR_20' ) start [2025-03-02 08:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590054', 'tblTempVendorCDR_20' ) end [2025-03-02 08:57:17] Production.INFO: ProcessCDR(1,14590054,1,1,2) [2025-03-02 08:57:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590054,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:57:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590054,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:57:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590054,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:57:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590054,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:57:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590054', 'tblTempUsageDetail_20' ) start [2025-03-02 08:57:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590054', 'tblTempUsageDetail_20' ) end [2025-03-02 08:57:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:57:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:57:20] Production.INFO: ==27382== Releasing lock... [2025-03-02 08:57:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:57:20] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 08:58:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:58:05 [end_date_ymd] => 2025-03-02 08:58:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 05:58:05' and `end` < '2025-03-02 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-03-02 08:58:17] Production.INFO: count ==208 [2025-03-02 08:58:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:58:05 - End Time 2025-03-02 08:58:05 [2025-03-02 08:58:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590059', 'tblTempUsageDetail_20' ) start [2025-03-02 08:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590059', 'tblTempUsageDetail_20' ) end [2025-03-02 08:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590059', 'tblTempVendorCDR_20' ) start [2025-03-02 08:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590059', 'tblTempVendorCDR_20' ) end [2025-03-02 08:58:17] Production.INFO: ProcessCDR(1,14590059,1,1,2) [2025-03-02 08:58:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590059,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:58:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590059,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:58:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590059,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:58:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590059,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:58:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590059', 'tblTempUsageDetail_20' ) start [2025-03-02 08:58:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590059', 'tblTempUsageDetail_20' ) end [2025-03-02 08:58:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:58:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:58:20] Production.INFO: ==27457== Releasing lock... [2025-03-02 08:58:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:58:20] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 08:59:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 05:59:05 [end_date_ymd] => 2025-03-02 08:59:05 [RateCDR] => 1 ) [2025-03-02 08: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-03-02 05:59:05' and `end` < '2025-03-02 08: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-03-02 08:59:17] Production.INFO: count ==208 [2025-03-02 08:59:17] Production.ERROR: pbx CDR StartTime 2025-03-02 05:59:05 - End Time 2025-03-02 08:59:05 [2025-03-02 08:59:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 08:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590064', 'tblTempUsageDetail_20' ) start [2025-03-02 08:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590064', 'tblTempUsageDetail_20' ) end [2025-03-02 08:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590064', 'tblTempVendorCDR_20' ) start [2025-03-02 08:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590064', 'tblTempVendorCDR_20' ) end [2025-03-02 08:59:17] Production.INFO: ProcessCDR(1,14590064,1,1,2) [2025-03-02 08:59:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590064,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:59:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590064,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 08:59:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590064,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:59:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590064,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 08:59:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590064', 'tblTempUsageDetail_20' ) start [2025-03-02 08:59:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590064', 'tblTempUsageDetail_20' ) end [2025-03-02 08:59:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 08:59:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 08:59:20] Production.INFO: ==27547== Releasing lock... [2025-03-02 08:59:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 08:59:20] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 09:00:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:00:05 [end_date_ymd] => 2025-03-02 09:00:05 [RateCDR] => 1 ) [2025-03-02 09: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-03-02 06:00:05' and `end` < '2025-03-02 09: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-03-02 09:00:17] Production.INFO: count ==208 [2025-03-02 09:00:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:00:05 - End Time 2025-03-02 09:00:05 [2025-03-02 09:00:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590070', 'tblTempUsageDetail_20' ) start [2025-03-02 09:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590070', 'tblTempUsageDetail_20' ) end [2025-03-02 09:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590070', 'tblTempVendorCDR_20' ) start [2025-03-02 09:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590070', 'tblTempVendorCDR_20' ) end [2025-03-02 09:00:17] Production.INFO: ProcessCDR(1,14590070,1,1,2) [2025-03-02 09:00:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590070,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:00:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590070,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:00:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590070,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:00:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590070,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:00:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590070', 'tblTempUsageDetail_20' ) start [2025-03-02 09:00:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590070', 'tblTempUsageDetail_20' ) end [2025-03-02 09:00:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:00:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:00:21] Production.INFO: ==27639== Releasing lock... [2025-03-02 09:00:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:00:21] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 09:01:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:01:06 [end_date_ymd] => 2025-03-02 09:01:06 [RateCDR] => 1 ) [2025-03-02 09: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-03-02 06:01:06' and `end` < '2025-03-02 09: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-03-02 09:01:18] Production.INFO: count ==204 [2025-03-02 09:01:18] Production.ERROR: pbx CDR StartTime 2025-03-02 06:01:06 - End Time 2025-03-02 09:01:06 [2025-03-02 09:01:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590075', 'tblTempUsageDetail_20' ) start [2025-03-02 09:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590075', 'tblTempUsageDetail_20' ) end [2025-03-02 09:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590075', 'tblTempVendorCDR_20' ) start [2025-03-02 09:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590075', 'tblTempVendorCDR_20' ) end [2025-03-02 09:01:18] Production.INFO: ProcessCDR(1,14590075,1,1,2) [2025-03-02 09:01:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590075,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:01:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590075,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:01:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590075,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:01:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590075,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590075', 'tblTempUsageDetail_20' ) start [2025-03-02 09:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590075', 'tblTempUsageDetail_20' ) end [2025-03-02 09:01:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:01:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:01:21] Production.INFO: ==27732== Releasing lock... [2025-03-02 09:01:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:01:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 09:02:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:02:05 [end_date_ymd] => 2025-03-02 09:02:05 [RateCDR] => 1 ) [2025-03-02 09: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-03-02 06:02:05' and `end` < '2025-03-02 09: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-03-02 09:02:17] Production.INFO: count ==204 [2025-03-02 09:02:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:02:05 - End Time 2025-03-02 09:02:05 [2025-03-02 09:02:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590080', 'tblTempUsageDetail_20' ) start [2025-03-02 09:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590080', 'tblTempUsageDetail_20' ) end [2025-03-02 09:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590080', 'tblTempVendorCDR_20' ) start [2025-03-02 09:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590080', 'tblTempVendorCDR_20' ) end [2025-03-02 09:02:17] Production.INFO: ProcessCDR(1,14590080,1,1,2) [2025-03-02 09:02:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590080,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:02:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590080,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:02:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590080,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:02:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590080,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:02:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590080', 'tblTempUsageDetail_20' ) start [2025-03-02 09:02:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590080', 'tblTempUsageDetail_20' ) end [2025-03-02 09:02:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:02:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:02:20] Production.INFO: ==27817== Releasing lock... [2025-03-02 09:02:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:02:20] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 09:03:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:03:06 [end_date_ymd] => 2025-03-02 09:03:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:03:06' and `end` < '2025-03-02 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-03-02 09:03:18] Production.INFO: count ==204 [2025-03-02 09:03:18] Production.ERROR: pbx CDR StartTime 2025-03-02 06:03:06 - End Time 2025-03-02 09:03:06 [2025-03-02 09:03:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590085', 'tblTempUsageDetail_20' ) start [2025-03-02 09:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590085', 'tblTempUsageDetail_20' ) end [2025-03-02 09:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590085', 'tblTempVendorCDR_20' ) start [2025-03-02 09:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590085', 'tblTempVendorCDR_20' ) end [2025-03-02 09:03:18] Production.INFO: ProcessCDR(1,14590085,1,1,2) [2025-03-02 09:03:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590085,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:03:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590085,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:03:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590085,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:03:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590085,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:03:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590085', 'tblTempUsageDetail_20' ) start [2025-03-02 09:03:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590085', 'tblTempUsageDetail_20' ) end [2025-03-02 09:03:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:03:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:03:21] Production.INFO: ==27896== Releasing lock... [2025-03-02 09:03:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:03:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 09:04:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:04:05 [end_date_ymd] => 2025-03-02 09:04:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:04:05' and `end` < '2025-03-02 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-03-02 09:04:17] Production.INFO: count ==204 [2025-03-02 09:04:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:04:05 - End Time 2025-03-02 09:04:05 [2025-03-02 09:04:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590090', 'tblTempUsageDetail_20' ) start [2025-03-02 09:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590090', 'tblTempUsageDetail_20' ) end [2025-03-02 09:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590090', 'tblTempVendorCDR_20' ) start [2025-03-02 09:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590090', 'tblTempVendorCDR_20' ) end [2025-03-02 09:04:17] Production.INFO: ProcessCDR(1,14590090,1,1,2) [2025-03-02 09:04:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590090,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:04:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590090,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:04:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590090,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:04:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590090,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:04:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590090', 'tblTempUsageDetail_20' ) start [2025-03-02 09:04:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590090', 'tblTempUsageDetail_20' ) end [2025-03-02 09:04:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:04:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:04:21] Production.INFO: ==27984== Releasing lock... [2025-03-02 09:04:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:04:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 09:05:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:05:06 [end_date_ymd] => 2025-03-02 09:05:06 [RateCDR] => 1 ) [2025-03-02 09: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-03-02 06:05:06' and `end` < '2025-03-02 09: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-03-02 09:05:18] Production.INFO: count ==204 [2025-03-02 09:05:18] Production.ERROR: pbx CDR StartTime 2025-03-02 06:05:06 - End Time 2025-03-02 09:05:06 [2025-03-02 09:05:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590095', 'tblTempUsageDetail_20' ) start [2025-03-02 09:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590095', 'tblTempUsageDetail_20' ) end [2025-03-02 09:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590095', 'tblTempVendorCDR_20' ) start [2025-03-02 09:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590095', 'tblTempVendorCDR_20' ) end [2025-03-02 09:05:18] Production.INFO: ProcessCDR(1,14590095,1,1,2) [2025-03-02 09:05:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590095,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:05:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590095,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:05:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590095,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:05:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590095,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:05:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590095', 'tblTempUsageDetail_20' ) start [2025-03-02 09:05:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590095', 'tblTempUsageDetail_20' ) end [2025-03-02 09:05:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:05:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:05:21] Production.INFO: ==28059== Releasing lock... [2025-03-02 09:05:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:05:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 09:06:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:06:05 [end_date_ymd] => 2025-03-02 09:06:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:06:05' and `end` < '2025-03-02 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-03-02 09:06:17] Production.INFO: count ==204 [2025-03-02 09:06:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:06:05 - End Time 2025-03-02 09:06:05 [2025-03-02 09:06:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590100', 'tblTempUsageDetail_20' ) start [2025-03-02 09:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590100', 'tblTempUsageDetail_20' ) end [2025-03-02 09:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590100', 'tblTempVendorCDR_20' ) start [2025-03-02 09:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590100', 'tblTempVendorCDR_20' ) end [2025-03-02 09:06:17] Production.INFO: ProcessCDR(1,14590100,1,1,2) [2025-03-02 09:06:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590100,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:06:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590100,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:06:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590100,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:06:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590100,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:06:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590100', 'tblTempUsageDetail_20' ) start [2025-03-02 09:06:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590100', 'tblTempUsageDetail_20' ) end [2025-03-02 09:06:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:06:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:06:20] Production.INFO: ==28131== Releasing lock... [2025-03-02 09:06:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:06:20] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 09:07:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:07:06 [end_date_ymd] => 2025-03-02 09:07:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:07:06' and `end` < '2025-03-02 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-03-02 09:07:17] Production.INFO: count ==204 [2025-03-02 09:07:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:07:06 - End Time 2025-03-02 09:07:06 [2025-03-02 09:07:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590105', 'tblTempUsageDetail_20' ) start [2025-03-02 09:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590105', 'tblTempUsageDetail_20' ) end [2025-03-02 09:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590105', 'tblTempVendorCDR_20' ) start [2025-03-02 09:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590105', 'tblTempVendorCDR_20' ) end [2025-03-02 09:07:18] Production.INFO: ProcessCDR(1,14590105,1,1,2) [2025-03-02 09:07:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590105,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:07:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590105,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:07:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590105,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:07:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590105,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:07:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590105', 'tblTempUsageDetail_20' ) start [2025-03-02 09:07:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590105', 'tblTempUsageDetail_20' ) end [2025-03-02 09:07:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:07:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:07:21] Production.INFO: ==28201== Releasing lock... [2025-03-02 09:07:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:07:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 09:08:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:08:05 [end_date_ymd] => 2025-03-02 09:08:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:08:05' and `end` < '2025-03-02 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-03-02 09:08:17] Production.INFO: count ==204 [2025-03-02 09:08:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:08:05 - End Time 2025-03-02 09:08:05 [2025-03-02 09:08:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590110', 'tblTempUsageDetail_20' ) start [2025-03-02 09:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590110', 'tblTempUsageDetail_20' ) end [2025-03-02 09:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590110', 'tblTempVendorCDR_20' ) start [2025-03-02 09:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590110', 'tblTempVendorCDR_20' ) end [2025-03-02 09:08:17] Production.INFO: ProcessCDR(1,14590110,1,1,2) [2025-03-02 09:08:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590110,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:08:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590110,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:08:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590110,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:08:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590110,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:08:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590110', 'tblTempUsageDetail_20' ) start [2025-03-02 09:08:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590110', 'tblTempUsageDetail_20' ) end [2025-03-02 09:08:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:08:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:08:20] Production.INFO: ==28276== Releasing lock... [2025-03-02 09:08:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:08:20] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 09:09:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:09:05 [end_date_ymd] => 2025-03-02 09:09:05 [RateCDR] => 1 ) [2025-03-02 09: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-03-02 06:09:05' and `end` < '2025-03-02 09: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-03-02 09:09:17] Production.INFO: count ==204 [2025-03-02 09:09:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:09:05 - End Time 2025-03-02 09:09:05 [2025-03-02 09:09:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590114', 'tblTempUsageDetail_20' ) start [2025-03-02 09:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590114', 'tblTempUsageDetail_20' ) end [2025-03-02 09:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590114', 'tblTempVendorCDR_20' ) start [2025-03-02 09:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590114', 'tblTempVendorCDR_20' ) end [2025-03-02 09:09:17] Production.INFO: ProcessCDR(1,14590114,1,1,2) [2025-03-02 09:09:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590114,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:09:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590114,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:09:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590114,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:09:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590114,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:09:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590114', 'tblTempUsageDetail_20' ) start [2025-03-02 09:09:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590114', 'tblTempUsageDetail_20' ) end [2025-03-02 09:09:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:09:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:09:21] Production.INFO: ==28350== Releasing lock... [2025-03-02 09:09:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:09:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 09:10:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:10:06 [end_date_ymd] => 2025-03-02 09:10:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:10:06' and `end` < '2025-03-02 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-03-02 09:10:18] Production.INFO: count ==202 [2025-03-02 09:10:18] Production.ERROR: pbx CDR StartTime 2025-03-02 06:10:06 - End Time 2025-03-02 09:10:06 [2025-03-02 09:10:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590121', 'tblTempUsageDetail_20' ) start [2025-03-02 09:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590121', 'tblTempUsageDetail_20' ) end [2025-03-02 09:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590121', 'tblTempVendorCDR_20' ) start [2025-03-02 09:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590121', 'tblTempVendorCDR_20' ) end [2025-03-02 09:10:18] Production.INFO: ProcessCDR(1,14590121,1,1,2) [2025-03-02 09:10:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590121,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:10:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590121,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:10:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590121,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:10:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590121,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:10:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590121', 'tblTempUsageDetail_20' ) start [2025-03-02 09:10:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590121', 'tblTempUsageDetail_20' ) end [2025-03-02 09:10:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:10:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:10:21] Production.INFO: ==28471== Releasing lock... [2025-03-02 09:10:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:10:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:11:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:11:05 [end_date_ymd] => 2025-03-02 09:11:05 [RateCDR] => 1 ) [2025-03-02 09: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-03-02 06:11:05' and `end` < '2025-03-02 09: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-03-02 09:11:17] Production.INFO: count ==202 [2025-03-02 09:11:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:11:05 - End Time 2025-03-02 09:11:05 [2025-03-02 09:11:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590126', 'tblTempUsageDetail_20' ) start [2025-03-02 09:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590126', 'tblTempUsageDetail_20' ) end [2025-03-02 09:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590126', 'tblTempVendorCDR_20' ) start [2025-03-02 09:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590126', 'tblTempVendorCDR_20' ) end [2025-03-02 09:11:17] Production.INFO: ProcessCDR(1,14590126,1,1,2) [2025-03-02 09:11:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590126,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:11:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590126,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:11:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590126,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:11:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590126,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:11:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590126', 'tblTempUsageDetail_20' ) start [2025-03-02 09:11:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590126', 'tblTempUsageDetail_20' ) end [2025-03-02 09:11:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:11:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:11:21] Production.INFO: ==28565== Releasing lock... [2025-03-02 09:11:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:11:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:12:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:12:05 [end_date_ymd] => 2025-03-02 09:12:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:12:05' and `end` < '2025-03-02 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-03-02 09:12:17] Production.INFO: count ==202 [2025-03-02 09:12:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:12:05 - End Time 2025-03-02 09:12:05 [2025-03-02 09:12:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590131', 'tblTempUsageDetail_20' ) start [2025-03-02 09:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590131', 'tblTempUsageDetail_20' ) end [2025-03-02 09:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590131', 'tblTempVendorCDR_20' ) start [2025-03-02 09:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590131', 'tblTempVendorCDR_20' ) end [2025-03-02 09:12:17] Production.INFO: ProcessCDR(1,14590131,1,1,2) [2025-03-02 09:12:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590131,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:12:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590131,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:12:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590131,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:12:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590131,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:12:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590131', 'tblTempUsageDetail_20' ) start [2025-03-02 09:12:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590131', 'tblTempUsageDetail_20' ) end [2025-03-02 09:12:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:12:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:12:20] Production.INFO: ==28642== Releasing lock... [2025-03-02 09:12:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:12:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:13:05 [end_date_ymd] => 2025-03-02 09:13:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:13:05' and `end` < '2025-03-02 09: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-03-02 09:13:17] Production.INFO: count ==202 [2025-03-02 09:13:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:13:05 - End Time 2025-03-02 09:13:05 [2025-03-02 09:13:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590136', 'tblTempUsageDetail_20' ) start [2025-03-02 09:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590136', 'tblTempUsageDetail_20' ) end [2025-03-02 09:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590136', 'tblTempVendorCDR_20' ) start [2025-03-02 09:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590136', 'tblTempVendorCDR_20' ) end [2025-03-02 09:13:17] Production.INFO: ProcessCDR(1,14590136,1,1,2) [2025-03-02 09:13:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590136,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:13:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590136,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:13:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590136,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:13:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590136,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:13:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590136', 'tblTempUsageDetail_20' ) start [2025-03-02 09:13:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590136', 'tblTempUsageDetail_20' ) end [2025-03-02 09:13:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:13:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:13:21] Production.INFO: ==28727== Releasing lock... [2025-03-02 09:13:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:13:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:14:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:14:05 [end_date_ymd] => 2025-03-02 09:14:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:14:05' and `end` < '2025-03-02 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-03-02 09:14:17] Production.INFO: count ==202 [2025-03-02 09:14:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:14:05 - End Time 2025-03-02 09:14:05 [2025-03-02 09:14:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590141', 'tblTempUsageDetail_20' ) start [2025-03-02 09:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590141', 'tblTempUsageDetail_20' ) end [2025-03-02 09:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590141', 'tblTempVendorCDR_20' ) start [2025-03-02 09:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590141', 'tblTempVendorCDR_20' ) end [2025-03-02 09:14:17] Production.INFO: ProcessCDR(1,14590141,1,1,2) [2025-03-02 09:14:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590141,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:14:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590141,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:14:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590141,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:14:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590141,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:14:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590141', 'tblTempUsageDetail_20' ) start [2025-03-02 09:14:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590141', 'tblTempUsageDetail_20' ) end [2025-03-02 09:14:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:14:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:14:20] Production.INFO: ==28819== Releasing lock... [2025-03-02 09:14:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:14:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:15:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:15:05 [end_date_ymd] => 2025-03-02 09:15:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:15:05' and `end` < '2025-03-02 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-03-02 09:15:17] Production.INFO: count ==198 [2025-03-02 09:15:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:15:05 - End Time 2025-03-02 09:15:05 [2025-03-02 09:15:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590146', 'tblTempUsageDetail_20' ) start [2025-03-02 09:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590146', 'tblTempUsageDetail_20' ) end [2025-03-02 09:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590146', 'tblTempVendorCDR_20' ) start [2025-03-02 09:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590146', 'tblTempVendorCDR_20' ) end [2025-03-02 09:15:17] Production.INFO: ProcessCDR(1,14590146,1,1,2) [2025-03-02 09:15:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590146,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:15:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590146,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:15:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590146,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:15:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590146,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:15:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590146', 'tblTempUsageDetail_20' ) start [2025-03-02 09:15:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590146', 'tblTempUsageDetail_20' ) end [2025-03-02 09:15:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:15:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:15:20] Production.INFO: ==28912== Releasing lock... [2025-03-02 09:15:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:15:20] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 09:16:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:16:05 [end_date_ymd] => 2025-03-02 09:16:05 [RateCDR] => 1 ) [2025-03-02 09: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-03-02 06:16:05' and `end` < '2025-03-02 09: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-03-02 09:16:17] Production.INFO: count ==194 [2025-03-02 09:16:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:16:05 - End Time 2025-03-02 09:16:05 [2025-03-02 09:16:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590151', 'tblTempUsageDetail_20' ) start [2025-03-02 09:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590151', 'tblTempUsageDetail_20' ) end [2025-03-02 09:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590151', 'tblTempVendorCDR_20' ) start [2025-03-02 09:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590151', 'tblTempVendorCDR_20' ) end [2025-03-02 09:16:17] Production.INFO: ProcessCDR(1,14590151,1,1,2) [2025-03-02 09:16:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590151,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:16:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590151,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:16:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590151,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:16:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590151,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:16:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590151', 'tblTempUsageDetail_20' ) start [2025-03-02 09:16:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590151', 'tblTempUsageDetail_20' ) end [2025-03-02 09:16:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:16:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:16:20] Production.INFO: ==29000== Releasing lock... [2025-03-02 09:16:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:16:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:17:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:17:05 [end_date_ymd] => 2025-03-02 09:17:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:17:05' and `end` < '2025-03-02 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-03-02 09:17:17] Production.INFO: count ==194 [2025-03-02 09:17:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:17:05 - End Time 2025-03-02 09:17:05 [2025-03-02 09:17:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590156', 'tblTempUsageDetail_20' ) start [2025-03-02 09:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590156', 'tblTempUsageDetail_20' ) end [2025-03-02 09:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590156', 'tblTempVendorCDR_20' ) start [2025-03-02 09:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590156', 'tblTempVendorCDR_20' ) end [2025-03-02 09:17:17] Production.INFO: ProcessCDR(1,14590156,1,1,2) [2025-03-02 09:17:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590156,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:17:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590156,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:17:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590156,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:17:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590156,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:17:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590156', 'tblTempUsageDetail_20' ) start [2025-03-02 09:17:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590156', 'tblTempUsageDetail_20' ) end [2025-03-02 09:17:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:17:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:17:20] Production.INFO: ==29080== Releasing lock... [2025-03-02 09:17:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:17:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:18:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:18:05 [end_date_ymd] => 2025-03-02 09:18:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:18:05' and `end` < '2025-03-02 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-03-02 09:18:16] Production.INFO: count ==195 [2025-03-02 09:18:16] Production.ERROR: pbx CDR StartTime 2025-03-02 06:18:05 - End Time 2025-03-02 09:18:05 [2025-03-02 09:18:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590161', 'tblTempUsageDetail_20' ) start [2025-03-02 09:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590161', 'tblTempUsageDetail_20' ) end [2025-03-02 09:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590161', 'tblTempVendorCDR_20' ) start [2025-03-02 09:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590161', 'tblTempVendorCDR_20' ) end [2025-03-02 09:18:16] Production.INFO: ProcessCDR(1,14590161,1,1,2) [2025-03-02 09:18:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590161,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:18:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590161,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:18:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590161,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:18:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590161,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590161', 'tblTempUsageDetail_20' ) start [2025-03-02 09:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590161', 'tblTempUsageDetail_20' ) end [2025-03-02 09:18:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:18:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:18:21] Production.INFO: ==29159== Releasing lock... [2025-03-02 09:18:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:18:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:19:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:19:05 [end_date_ymd] => 2025-03-02 09:19:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:19:05' and `end` < '2025-03-02 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-03-02 09:19:17] Production.INFO: count ==192 [2025-03-02 09:19:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:19:05 - End Time 2025-03-02 09:19:05 [2025-03-02 09:19:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590166', 'tblTempUsageDetail_20' ) start [2025-03-02 09:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590166', 'tblTempUsageDetail_20' ) end [2025-03-02 09:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590166', 'tblTempVendorCDR_20' ) start [2025-03-02 09:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590166', 'tblTempVendorCDR_20' ) end [2025-03-02 09:19:17] Production.INFO: ProcessCDR(1,14590166,1,1,2) [2025-03-02 09:19:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590166,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:19:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590166,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:19:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590166,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:19:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590166,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:19:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590166', 'tblTempUsageDetail_20' ) start [2025-03-02 09:19:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590166', 'tblTempUsageDetail_20' ) end [2025-03-02 09:19:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:19:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:19:20] Production.INFO: ==29241== Releasing lock... [2025-03-02 09:19:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:19:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:20:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:20:07 [end_date_ymd] => 2025-03-02 09:20:07 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:20:07' and `end` < '2025-03-02 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-03-02 09:20:19] Production.INFO: count ==191 [2025-03-02 09:20:19] Production.ERROR: pbx CDR StartTime 2025-03-02 06:20:07 - End Time 2025-03-02 09:20:07 [2025-03-02 09:20:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:20:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590172', 'tblTempUsageDetail_20' ) start [2025-03-02 09:20:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590172', 'tblTempUsageDetail_20' ) end [2025-03-02 09:20:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590172', 'tblTempVendorCDR_20' ) start [2025-03-02 09:20:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590172', 'tblTempVendorCDR_20' ) end [2025-03-02 09:20:19] Production.INFO: ProcessCDR(1,14590172,1,1,2) [2025-03-02 09:20:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590172,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:20:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590172,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:20:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590172,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:20:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590172,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590172', 'tblTempUsageDetail_20' ) start [2025-03-02 09:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590172', 'tblTempUsageDetail_20' ) end [2025-03-02 09:20:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:20:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:20:22] Production.INFO: ==29329== Releasing lock... [2025-03-02 09:20:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:20:22] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:21:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:21:05 [end_date_ymd] => 2025-03-02 09:21:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:21:05' and `end` < '2025-03-02 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-03-02 09:21:17] Production.INFO: count ==191 [2025-03-02 09:21:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:21:05 - End Time 2025-03-02 09:21:05 [2025-03-02 09:21:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590177', 'tblTempUsageDetail_20' ) start [2025-03-02 09:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590177', 'tblTempUsageDetail_20' ) end [2025-03-02 09:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590177', 'tblTempVendorCDR_20' ) start [2025-03-02 09:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590177', 'tblTempVendorCDR_20' ) end [2025-03-02 09:21:17] Production.INFO: ProcessCDR(1,14590177,1,1,2) [2025-03-02 09:21:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590177,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:21:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590177,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:21:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590177,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:21:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590177,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:21:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590177', 'tblTempUsageDetail_20' ) start [2025-03-02 09:21:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590177', 'tblTempUsageDetail_20' ) end [2025-03-02 09:21:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:21:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:21:21] Production.INFO: ==29405== Releasing lock... [2025-03-02 09:21:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:21:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:22:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:22:05 [end_date_ymd] => 2025-03-02 09:22:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:22:05' and `end` < '2025-03-02 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-03-02 09:22:17] Production.INFO: count ==191 [2025-03-02 09:22:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:22:05 - End Time 2025-03-02 09:22:05 [2025-03-02 09:22:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590182', 'tblTempUsageDetail_20' ) start [2025-03-02 09:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590182', 'tblTempUsageDetail_20' ) end [2025-03-02 09:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590182', 'tblTempVendorCDR_20' ) start [2025-03-02 09:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590182', 'tblTempVendorCDR_20' ) end [2025-03-02 09:22:17] Production.INFO: ProcessCDR(1,14590182,1,1,2) [2025-03-02 09:22:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590182,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:22:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590182,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:22:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590182,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:22:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590182,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:22:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590182', 'tblTempUsageDetail_20' ) start [2025-03-02 09:22:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590182', 'tblTempUsageDetail_20' ) end [2025-03-02 09:22:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:22:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:22:20] Production.INFO: ==29488== Releasing lock... [2025-03-02 09:22:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:22:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:23:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:23:05 [end_date_ymd] => 2025-03-02 09:23:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:23:05' and `end` < '2025-03-02 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-03-02 09:23:17] Production.INFO: count ==191 [2025-03-02 09:23:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:23:05 - End Time 2025-03-02 09:23:05 [2025-03-02 09:23:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590187', 'tblTempUsageDetail_20' ) start [2025-03-02 09:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590187', 'tblTempUsageDetail_20' ) end [2025-03-02 09:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590187', 'tblTempVendorCDR_20' ) start [2025-03-02 09:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590187', 'tblTempVendorCDR_20' ) end [2025-03-02 09:23:17] Production.INFO: ProcessCDR(1,14590187,1,1,2) [2025-03-02 09:23:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590187,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:23:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590187,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:23:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590187,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:23:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590187,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:23:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590187', 'tblTempUsageDetail_20' ) start [2025-03-02 09:23:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590187', 'tblTempUsageDetail_20' ) end [2025-03-02 09:23:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:23:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:23:20] Production.INFO: ==29574== Releasing lock... [2025-03-02 09:23:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:23:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:24:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:24:06 [end_date_ymd] => 2025-03-02 09:24:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:24:06' and `end` < '2025-03-02 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-03-02 09:24:17] Production.INFO: count ==191 [2025-03-02 09:24:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:24:06 - End Time 2025-03-02 09:24:06 [2025-03-02 09:24:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590192', 'tblTempUsageDetail_20' ) start [2025-03-02 09:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590192', 'tblTempUsageDetail_20' ) end [2025-03-02 09:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590192', 'tblTempVendorCDR_20' ) start [2025-03-02 09:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590192', 'tblTempVendorCDR_20' ) end [2025-03-02 09:24:17] Production.INFO: ProcessCDR(1,14590192,1,1,2) [2025-03-02 09:24:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590192,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:24:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590192,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:24:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590192,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:24:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590192,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590192', 'tblTempUsageDetail_20' ) start [2025-03-02 09:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590192', 'tblTempUsageDetail_20' ) end [2025-03-02 09:24:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:24:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:24:21] Production.INFO: ==29656== Releasing lock... [2025-03-02 09:24:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:24:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:25:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:25:05 [end_date_ymd] => 2025-03-02 09:25:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:25:05' and `end` < '2025-03-02 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-03-02 09:25:17] Production.INFO: count ==191 [2025-03-02 09:25:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:25:05 - End Time 2025-03-02 09:25:05 [2025-03-02 09:25:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590197', 'tblTempUsageDetail_20' ) start [2025-03-02 09:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590197', 'tblTempUsageDetail_20' ) end [2025-03-02 09:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590197', 'tblTempVendorCDR_20' ) start [2025-03-02 09:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590197', 'tblTempVendorCDR_20' ) end [2025-03-02 09:25:17] Production.INFO: ProcessCDR(1,14590197,1,1,2) [2025-03-02 09:25:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590197,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:25:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590197,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:25:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590197,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:25:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590197,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590197', 'tblTempUsageDetail_20' ) start [2025-03-02 09:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590197', 'tblTempUsageDetail_20' ) end [2025-03-02 09:25:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:25:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:25:21] Production.INFO: ==29774== Releasing lock... [2025-03-02 09:25:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:25:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:26:05 [end_date_ymd] => 2025-03-02 09:26:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:26:05' and `end` < '2025-03-02 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-03-02 09:26:17] Production.INFO: count ==183 [2025-03-02 09:26:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:26:05 - End Time 2025-03-02 09:26:05 [2025-03-02 09:26:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590202', 'tblTempUsageDetail_20' ) start [2025-03-02 09:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590202', 'tblTempUsageDetail_20' ) end [2025-03-02 09:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590202', 'tblTempVendorCDR_20' ) start [2025-03-02 09:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590202', 'tblTempVendorCDR_20' ) end [2025-03-02 09:26:17] Production.INFO: ProcessCDR(1,14590202,1,1,2) [2025-03-02 09:26:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590202,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:26:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590202,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:26:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590202,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:26:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590202,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:26:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590202', 'tblTempUsageDetail_20' ) start [2025-03-02 09:26:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590202', 'tblTempUsageDetail_20' ) end [2025-03-02 09:26:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:26:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:26:20] Production.INFO: ==29858== Releasing lock... [2025-03-02 09:26:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:26:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:27:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:27:05 [end_date_ymd] => 2025-03-02 09:27:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:27:05' and `end` < '2025-03-02 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-03-02 09:27:17] Production.INFO: count ==180 [2025-03-02 09:27:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:27:05 - End Time 2025-03-02 09:27:05 [2025-03-02 09:27:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590207', 'tblTempUsageDetail_20' ) start [2025-03-02 09:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590207', 'tblTempUsageDetail_20' ) end [2025-03-02 09:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590207', 'tblTempVendorCDR_20' ) start [2025-03-02 09:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590207', 'tblTempVendorCDR_20' ) end [2025-03-02 09:27:17] Production.INFO: ProcessCDR(1,14590207,1,1,2) [2025-03-02 09:27:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590207,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:27:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590207,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:27:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590207,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:27:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590207,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:27:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590207', 'tblTempUsageDetail_20' ) start [2025-03-02 09:27:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590207', 'tblTempUsageDetail_20' ) end [2025-03-02 09:27:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:27:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:27:22] Production.INFO: ==29940== Releasing lock... [2025-03-02 09:27:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:27:22] Production.INFO: 29 MB #Memory Used# [2025-03-02 09:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:28:05 [end_date_ymd] => 2025-03-02 09:28:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:28:05' and `end` < '2025-03-02 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-03-02 09:28:17] Production.INFO: count ==181 [2025-03-02 09:28:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:28:05 - End Time 2025-03-02 09:28:05 [2025-03-02 09:28:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590212', 'tblTempUsageDetail_20' ) start [2025-03-02 09:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590212', 'tblTempUsageDetail_20' ) end [2025-03-02 09:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590212', 'tblTempVendorCDR_20' ) start [2025-03-02 09:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590212', 'tblTempVendorCDR_20' ) end [2025-03-02 09:28:17] Production.INFO: ProcessCDR(1,14590212,1,1,2) [2025-03-02 09:28:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590212,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:28:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590212,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:28:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590212,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:28:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590212,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:28:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590212', 'tblTempUsageDetail_20' ) start [2025-03-02 09:28:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590212', 'tblTempUsageDetail_20' ) end [2025-03-02 09:28:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:28:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:28:22] Production.INFO: ==30025== Releasing lock... [2025-03-02 09:28:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:28:22] Production.INFO: 29 MB #Memory Used# [2025-03-02 09:29:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:29:04 [end_date_ymd] => 2025-03-02 09:29:04 [RateCDR] => 1 ) [2025-03-02 09: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-03-02 06:29:04' and `end` < '2025-03-02 09: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-03-02 09:29:16] Production.INFO: count ==181 [2025-03-02 09:29:16] Production.ERROR: pbx CDR StartTime 2025-03-02 06:29:04 - End Time 2025-03-02 09:29:04 [2025-03-02 09:29:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590217', 'tblTempUsageDetail_20' ) start [2025-03-02 09:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590217', 'tblTempUsageDetail_20' ) end [2025-03-02 09:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590217', 'tblTempVendorCDR_20' ) start [2025-03-02 09:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590217', 'tblTempVendorCDR_20' ) end [2025-03-02 09:29:16] Production.INFO: ProcessCDR(1,14590217,1,1,2) [2025-03-02 09:29:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590217,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:29:17] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590217,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:29:17] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590217,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:29:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590217,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:29:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590217', 'tblTempUsageDetail_20' ) start [2025-03-02 09:29:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590217', 'tblTempUsageDetail_20' ) end [2025-03-02 09:29:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:29:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:29:20] Production.INFO: ==30097== Releasing lock... [2025-03-02 09:29:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:29:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 09:30:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:30:07 [end_date_ymd] => 2025-03-02 09:30:07 [RateCDR] => 1 ) [2025-03-02 09: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-03-02 06:30:07' and `end` < '2025-03-02 09: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-03-02 09:30:19] Production.INFO: count ==177 [2025-03-02 09:30:19] Production.ERROR: pbx CDR StartTime 2025-03-02 06:30:07 - End Time 2025-03-02 09:30:07 [2025-03-02 09:30:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:30:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590223', 'tblTempUsageDetail_20' ) start [2025-03-02 09:30:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590223', 'tblTempUsageDetail_20' ) end [2025-03-02 09:30:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590223', 'tblTempVendorCDR_20' ) start [2025-03-02 09:30:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590223', 'tblTempVendorCDR_20' ) end [2025-03-02 09:30:19] Production.INFO: ProcessCDR(1,14590223,1,1,2) [2025-03-02 09:30:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590223,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:30:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590223,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:30:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590223,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:30:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590223,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:30:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590223', 'tblTempUsageDetail_20' ) start [2025-03-02 09:30:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590223', 'tblTempUsageDetail_20' ) end [2025-03-02 09:30:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:30:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:30:22] Production.INFO: ==30177== Releasing lock... [2025-03-02 09:30:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:30:22] Production.INFO: 29 MB #Memory Used# [2025-03-02 09:31:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:31:05 [end_date_ymd] => 2025-03-02 09:31:05 [RateCDR] => 1 ) [2025-03-02 09: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-03-02 06:31:05' and `end` < '2025-03-02 09: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-03-02 09:31:17] Production.INFO: count ==177 [2025-03-02 09:31:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:31:05 - End Time 2025-03-02 09:31:05 [2025-03-02 09:31:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590228', 'tblTempUsageDetail_20' ) start [2025-03-02 09:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590228', 'tblTempUsageDetail_20' ) end [2025-03-02 09:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590228', 'tblTempVendorCDR_20' ) start [2025-03-02 09:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590228', 'tblTempVendorCDR_20' ) end [2025-03-02 09:31:17] Production.INFO: ProcessCDR(1,14590228,1,1,2) [2025-03-02 09:31:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590228,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:31:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590228,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:31:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590228,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:31:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590228,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:31:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590228', 'tblTempUsageDetail_20' ) start [2025-03-02 09:31:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590228', 'tblTempUsageDetail_20' ) end [2025-03-02 09:31:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:31:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:31:21] Production.INFO: ==30260== Releasing lock... [2025-03-02 09:31:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:31:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 09:32:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:32:05 [end_date_ymd] => 2025-03-02 09:32:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:32:05' and `end` < '2025-03-02 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-03-02 09:32:17] Production.INFO: count ==177 [2025-03-02 09:32:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:32:05 - End Time 2025-03-02 09:32:05 [2025-03-02 09:32:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590233', 'tblTempUsageDetail_20' ) start [2025-03-02 09:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590233', 'tblTempUsageDetail_20' ) end [2025-03-02 09:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590233', 'tblTempVendorCDR_20' ) start [2025-03-02 09:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590233', 'tblTempVendorCDR_20' ) end [2025-03-02 09:32:17] Production.INFO: ProcessCDR(1,14590233,1,1,2) [2025-03-02 09:32:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590233,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:32:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590233,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:32:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590233,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:32:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590233,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:32:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590233', 'tblTempUsageDetail_20' ) start [2025-03-02 09:32:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590233', 'tblTempUsageDetail_20' ) end [2025-03-02 09:32:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:32:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:32:21] Production.INFO: ==30335== Releasing lock... [2025-03-02 09:32:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:32:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 09:33:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:33:05 [end_date_ymd] => 2025-03-02 09:33:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:33:05' and `end` < '2025-03-02 09: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-03-02 09:33:17] Production.INFO: count ==178 [2025-03-02 09:33:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:33:05 - End Time 2025-03-02 09:33:05 [2025-03-02 09:33:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590238', 'tblTempUsageDetail_20' ) start [2025-03-02 09:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590238', 'tblTempUsageDetail_20' ) end [2025-03-02 09:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590238', 'tblTempVendorCDR_20' ) start [2025-03-02 09:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590238', 'tblTempVendorCDR_20' ) end [2025-03-02 09:33:17] Production.INFO: ProcessCDR(1,14590238,1,1,2) [2025-03-02 09:33:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590238,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:33:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590238,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:33:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590238,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:33:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590238,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:33:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590238', 'tblTempUsageDetail_20' ) start [2025-03-02 09:33:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590238', 'tblTempUsageDetail_20' ) end [2025-03-02 09:33:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:33:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:33:22] Production.INFO: ==30425== Releasing lock... [2025-03-02 09:33:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:33:22] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:34:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:34:05 [end_date_ymd] => 2025-03-02 09:34:05 [RateCDR] => 1 ) [2025-03-02 09: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-03-02 06:34:05' and `end` < '2025-03-02 09: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-03-02 09:34:17] Production.INFO: count ==178 [2025-03-02 09:34:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:34:05 - End Time 2025-03-02 09:34:05 [2025-03-02 09:34:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590243', 'tblTempUsageDetail_20' ) start [2025-03-02 09:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590243', 'tblTempUsageDetail_20' ) end [2025-03-02 09:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590243', 'tblTempVendorCDR_20' ) start [2025-03-02 09:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590243', 'tblTempVendorCDR_20' ) end [2025-03-02 09:34:17] Production.INFO: ProcessCDR(1,14590243,1,1,2) [2025-03-02 09:34:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590243,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:34:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590243,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:34:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590243,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:34:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590243,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:34:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590243', 'tblTempUsageDetail_20' ) start [2025-03-02 09:34:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590243', 'tblTempUsageDetail_20' ) end [2025-03-02 09:34:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:34:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:34:21] Production.INFO: ==30504== Releasing lock... [2025-03-02 09:34:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:34:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:35:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:35:05 [end_date_ymd] => 2025-03-02 09:35:05 [RateCDR] => 1 ) [2025-03-02 09: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-03-02 06:35:05' and `end` < '2025-03-02 09: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-03-02 09:35:17] Production.INFO: count ==178 [2025-03-02 09:35:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:35:05 - End Time 2025-03-02 09:35:05 [2025-03-02 09:35:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590248', 'tblTempUsageDetail_20' ) start [2025-03-02 09:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590248', 'tblTempUsageDetail_20' ) end [2025-03-02 09:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590248', 'tblTempVendorCDR_20' ) start [2025-03-02 09:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590248', 'tblTempVendorCDR_20' ) end [2025-03-02 09:35:17] Production.INFO: ProcessCDR(1,14590248,1,1,2) [2025-03-02 09:35:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590248,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:35:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590248,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:35:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590248,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:35:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590248,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:35:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590248', 'tblTempUsageDetail_20' ) start [2025-03-02 09:35:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590248', 'tblTempUsageDetail_20' ) end [2025-03-02 09:35:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:35:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:35:20] Production.INFO: ==30586== Releasing lock... [2025-03-02 09:35:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:35:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:36:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:36:05 [end_date_ymd] => 2025-03-02 09:36:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:36:05' and `end` < '2025-03-02 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-03-02 09:36:17] Production.INFO: count ==178 [2025-03-02 09:36:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:36:05 - End Time 2025-03-02 09:36:05 [2025-03-02 09:36:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590253', 'tblTempUsageDetail_20' ) start [2025-03-02 09:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590253', 'tblTempUsageDetail_20' ) end [2025-03-02 09:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590253', 'tblTempVendorCDR_20' ) start [2025-03-02 09:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590253', 'tblTempVendorCDR_20' ) end [2025-03-02 09:36:17] Production.INFO: ProcessCDR(1,14590253,1,1,2) [2025-03-02 09:36:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590253,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:36:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590253,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:36:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590253,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:36:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590253,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:36:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590253', 'tblTempUsageDetail_20' ) start [2025-03-02 09:36:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590253', 'tblTempUsageDetail_20' ) end [2025-03-02 09:36:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:36:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:36:21] Production.INFO: ==30664== Releasing lock... [2025-03-02 09:36:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:36:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:37:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:37:05 [end_date_ymd] => 2025-03-02 09:37:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:37:05' and `end` < '2025-03-02 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-03-02 09:37:17] Production.INFO: count ==178 [2025-03-02 09:37:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:37:05 - End Time 2025-03-02 09:37:05 [2025-03-02 09:37:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590258', 'tblTempUsageDetail_20' ) start [2025-03-02 09:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590258', 'tblTempUsageDetail_20' ) end [2025-03-02 09:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590258', 'tblTempVendorCDR_20' ) start [2025-03-02 09:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590258', 'tblTempVendorCDR_20' ) end [2025-03-02 09:37:17] Production.INFO: ProcessCDR(1,14590258,1,1,2) [2025-03-02 09:37:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590258,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:37:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590258,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:37:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590258,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:37:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590258,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590258', 'tblTempUsageDetail_20' ) start [2025-03-02 09:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590258', 'tblTempUsageDetail_20' ) end [2025-03-02 09:37:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:37:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:37:21] Production.INFO: ==30735== Releasing lock... [2025-03-02 09:37:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:37:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:38:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:38:05 [end_date_ymd] => 2025-03-02 09:38:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:38:05' and `end` < '2025-03-02 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-03-02 09:38:17] Production.INFO: count ==178 [2025-03-02 09:38:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:38:05 - End Time 2025-03-02 09:38:05 [2025-03-02 09:38:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590263', 'tblTempUsageDetail_20' ) start [2025-03-02 09:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590263', 'tblTempUsageDetail_20' ) end [2025-03-02 09:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590263', 'tblTempVendorCDR_20' ) start [2025-03-02 09:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590263', 'tblTempVendorCDR_20' ) end [2025-03-02 09:38:17] Production.INFO: ProcessCDR(1,14590263,1,1,2) [2025-03-02 09:38:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590263,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:38:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590263,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:38:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590263,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:38:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590263,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:38:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590263', 'tblTempUsageDetail_20' ) start [2025-03-02 09:38:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590263', 'tblTempUsageDetail_20' ) end [2025-03-02 09:38:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:38:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:38:21] Production.INFO: ==30815== Releasing lock... [2025-03-02 09:38:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:38:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:39:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:39:05 [end_date_ymd] => 2025-03-02 09:39:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:39:05' and `end` < '2025-03-02 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-03-02 09:39:17] Production.INFO: count ==178 [2025-03-02 09:39:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:39:05 - End Time 2025-03-02 09:39:05 [2025-03-02 09:39:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590268', 'tblTempUsageDetail_20' ) start [2025-03-02 09:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590268', 'tblTempUsageDetail_20' ) end [2025-03-02 09:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590268', 'tblTempVendorCDR_20' ) start [2025-03-02 09:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590268', 'tblTempVendorCDR_20' ) end [2025-03-02 09:39:17] Production.INFO: ProcessCDR(1,14590268,1,1,2) [2025-03-02 09:39:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590268,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:39:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590268,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:39:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590268,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:39:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590268,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:39:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590268', 'tblTempUsageDetail_20' ) start [2025-03-02 09:39:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590268', 'tblTempUsageDetail_20' ) end [2025-03-02 09:39:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:39:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:39:20] Production.INFO: ==30900== Releasing lock... [2025-03-02 09:39:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:39:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:40:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:40:06 [end_date_ymd] => 2025-03-02 09:40:06 [RateCDR] => 1 ) [2025-03-02 09: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-03-02 06:40:06' and `end` < '2025-03-02 09: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-03-02 09:40:18] Production.INFO: count ==184 [2025-03-02 09:40:18] Production.ERROR: pbx CDR StartTime 2025-03-02 06:40:06 - End Time 2025-03-02 09:40:06 [2025-03-02 09:40:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590274', 'tblTempUsageDetail_20' ) start [2025-03-02 09:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590274', 'tblTempUsageDetail_20' ) end [2025-03-02 09:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590274', 'tblTempVendorCDR_20' ) start [2025-03-02 09:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590274', 'tblTempVendorCDR_20' ) end [2025-03-02 09:40:18] Production.INFO: ProcessCDR(1,14590274,1,1,2) [2025-03-02 09:40:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590274,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:40:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590274,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:40:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590274,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:40:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590274,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:40:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590274', 'tblTempUsageDetail_20' ) start [2025-03-02 09:40:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590274', 'tblTempUsageDetail_20' ) end [2025-03-02 09:40:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:40:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:40:21] Production.INFO: ==30983== Releasing lock... [2025-03-02 09:40:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:40:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:41:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:41:05 [end_date_ymd] => 2025-03-02 09:41:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:41:05' and `end` < '2025-03-02 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-03-02 09:41:16] Production.INFO: count ==186 [2025-03-02 09:41:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:41:05 - End Time 2025-03-02 09:41:05 [2025-03-02 09:41:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590279', 'tblTempUsageDetail_20' ) start [2025-03-02 09:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590279', 'tblTempUsageDetail_20' ) end [2025-03-02 09:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590279', 'tblTempVendorCDR_20' ) start [2025-03-02 09:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590279', 'tblTempVendorCDR_20' ) end [2025-03-02 09:41:17] Production.INFO: ProcessCDR(1,14590279,1,1,2) [2025-03-02 09:41:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590279,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:41:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590279,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:41:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590279,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:41:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590279,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:41:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590279', 'tblTempUsageDetail_20' ) start [2025-03-02 09:41:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590279', 'tblTempUsageDetail_20' ) end [2025-03-02 09:41:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:41:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:41:20] Production.INFO: ==31100== Releasing lock... [2025-03-02 09:41:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:41:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:42:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:42:05 [end_date_ymd] => 2025-03-02 09:42:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:42:05' and `end` < '2025-03-02 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-03-02 09:42:17] Production.INFO: count ==188 [2025-03-02 09:42:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:42:05 - End Time 2025-03-02 09:42:05 [2025-03-02 09:42:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590284', 'tblTempUsageDetail_20' ) start [2025-03-02 09:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590284', 'tblTempUsageDetail_20' ) end [2025-03-02 09:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590284', 'tblTempVendorCDR_20' ) start [2025-03-02 09:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590284', 'tblTempVendorCDR_20' ) end [2025-03-02 09:42:17] Production.INFO: ProcessCDR(1,14590284,1,1,2) [2025-03-02 09:42:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590284,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:42:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590284,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:42:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590284,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:42:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590284,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:42:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590284', 'tblTempUsageDetail_20' ) start [2025-03-02 09:42:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590284', 'tblTempUsageDetail_20' ) end [2025-03-02 09:42:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:42:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:42:20] Production.INFO: ==31189== Releasing lock... [2025-03-02 09:42:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:42:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:43:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:43:05 [end_date_ymd] => 2025-03-02 09:43:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:43:05' and `end` < '2025-03-02 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-03-02 09:43:17] Production.INFO: count ==188 [2025-03-02 09:43:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:43:05 - End Time 2025-03-02 09:43:05 [2025-03-02 09:43:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590289', 'tblTempUsageDetail_20' ) start [2025-03-02 09:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590289', 'tblTempUsageDetail_20' ) end [2025-03-02 09:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590289', 'tblTempVendorCDR_20' ) start [2025-03-02 09:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590289', 'tblTempVendorCDR_20' ) end [2025-03-02 09:43:17] Production.INFO: ProcessCDR(1,14590289,1,1,2) [2025-03-02 09:43:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590289,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:43:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590289,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:43:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590289,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:43:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590289,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:43:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590289', 'tblTempUsageDetail_20' ) start [2025-03-02 09:43:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590289', 'tblTempUsageDetail_20' ) end [2025-03-02 09:43:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:43:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:43:21] Production.INFO: ==31271== Releasing lock... [2025-03-02 09:43:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:43:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:44:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:44:05 [end_date_ymd] => 2025-03-02 09:44:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:44:05' and `end` < '2025-03-02 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-03-02 09:44:17] Production.INFO: count ==190 [2025-03-02 09:44:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:44:05 - End Time 2025-03-02 09:44:05 [2025-03-02 09:44:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590294', 'tblTempUsageDetail_20' ) start [2025-03-02 09:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590294', 'tblTempUsageDetail_20' ) end [2025-03-02 09:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590294', 'tblTempVendorCDR_20' ) start [2025-03-02 09:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590294', 'tblTempVendorCDR_20' ) end [2025-03-02 09:44:17] Production.INFO: ProcessCDR(1,14590294,1,1,2) [2025-03-02 09:44:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590294,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:44:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590294,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:44:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590294,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:44:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590294,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:44:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590294', 'tblTempUsageDetail_20' ) start [2025-03-02 09:44:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590294', 'tblTempUsageDetail_20' ) end [2025-03-02 09:44:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:44:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:44:20] Production.INFO: ==31350== Releasing lock... [2025-03-02 09:44:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:44:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:45:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:45:05 [end_date_ymd] => 2025-03-02 09:45:05 [RateCDR] => 1 ) [2025-03-02 09: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-03-02 06:45:05' and `end` < '2025-03-02 09: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-03-02 09:45:17] Production.INFO: count ==189 [2025-03-02 09:45:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:45:05 - End Time 2025-03-02 09:45:05 [2025-03-02 09:45:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590299', 'tblTempUsageDetail_20' ) start [2025-03-02 09:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590299', 'tblTempUsageDetail_20' ) end [2025-03-02 09:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590299', 'tblTempVendorCDR_20' ) start [2025-03-02 09:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590299', 'tblTempVendorCDR_20' ) end [2025-03-02 09:45:17] Production.INFO: ProcessCDR(1,14590299,1,1,2) [2025-03-02 09:45:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590299,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:45:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590299,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:45:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590299,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:45:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590299,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:45:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590299', 'tblTempUsageDetail_20' ) start [2025-03-02 09:45:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590299', 'tblTempUsageDetail_20' ) end [2025-03-02 09:45:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:45:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:45:20] Production.INFO: ==31439== Releasing lock... [2025-03-02 09:45:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:45:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:46:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:46:05 [end_date_ymd] => 2025-03-02 09:46:05 [RateCDR] => 1 ) [2025-03-02 09: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-03-02 06:46:05' and `end` < '2025-03-02 09: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-03-02 09:46:17] Production.INFO: count ==189 [2025-03-02 09:46:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:46:05 - End Time 2025-03-02 09:46:05 [2025-03-02 09:46:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590304', 'tblTempUsageDetail_20' ) start [2025-03-02 09:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590304', 'tblTempUsageDetail_20' ) end [2025-03-02 09:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590304', 'tblTempVendorCDR_20' ) start [2025-03-02 09:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590304', 'tblTempVendorCDR_20' ) end [2025-03-02 09:46:17] Production.INFO: ProcessCDR(1,14590304,1,1,2) [2025-03-02 09:46:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590304,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:46:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590304,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:46:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590304,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:46:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590304,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:46:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590304', 'tblTempUsageDetail_20' ) start [2025-03-02 09:46:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590304', 'tblTempUsageDetail_20' ) end [2025-03-02 09:46:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:46:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:46:20] Production.INFO: ==31525== Releasing lock... [2025-03-02 09:46:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:46:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:47:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:47:05 [end_date_ymd] => 2025-03-02 09:47:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:47:05' and `end` < '2025-03-02 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-03-02 09:47:17] Production.INFO: count ==189 [2025-03-02 09:47:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:47:05 - End Time 2025-03-02 09:47:05 [2025-03-02 09:47:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590309', 'tblTempUsageDetail_20' ) start [2025-03-02 09:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590309', 'tblTempUsageDetail_20' ) end [2025-03-02 09:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590309', 'tblTempVendorCDR_20' ) start [2025-03-02 09:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590309', 'tblTempVendorCDR_20' ) end [2025-03-02 09:47:17] Production.INFO: ProcessCDR(1,14590309,1,1,2) [2025-03-02 09:47:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590309,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:47:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590309,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:47:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590309,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:47:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590309,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:47:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590309', 'tblTempUsageDetail_20' ) start [2025-03-02 09:47:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590309', 'tblTempUsageDetail_20' ) end [2025-03-02 09:47:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:47:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:47:21] Production.INFO: ==31603== Releasing lock... [2025-03-02 09:47:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:47:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:48:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:48:05 [end_date_ymd] => 2025-03-02 09:48:05 [RateCDR] => 1 ) [2025-03-02 09: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-03-02 06:48:05' and `end` < '2025-03-02 09: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-03-02 09:48:17] Production.INFO: count ==189 [2025-03-02 09:48:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:48:05 - End Time 2025-03-02 09:48:05 [2025-03-02 09:48:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590314', 'tblTempUsageDetail_20' ) start [2025-03-02 09:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590314', 'tblTempUsageDetail_20' ) end [2025-03-02 09:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590314', 'tblTempVendorCDR_20' ) start [2025-03-02 09:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590314', 'tblTempVendorCDR_20' ) end [2025-03-02 09:48:17] Production.INFO: ProcessCDR(1,14590314,1,1,2) [2025-03-02 09:48:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590314,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:48:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590314,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:48:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590314,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:48:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590314,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:48:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590314', 'tblTempUsageDetail_20' ) start [2025-03-02 09:48:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590314', 'tblTempUsageDetail_20' ) end [2025-03-02 09:48:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:48:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:48:20] Production.INFO: ==31680== Releasing lock... [2025-03-02 09:48:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:48:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:49:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:49:05 [end_date_ymd] => 2025-03-02 09:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:49:05' and `end` < '2025-03-02 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-03-02 09:49:17] Production.INFO: count ==187 [2025-03-02 09:49:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:49:05 - End Time 2025-03-02 09:49:05 [2025-03-02 09:49:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590319', 'tblTempUsageDetail_20' ) start [2025-03-02 09:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590319', 'tblTempUsageDetail_20' ) end [2025-03-02 09:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590319', 'tblTempVendorCDR_20' ) start [2025-03-02 09:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590319', 'tblTempVendorCDR_20' ) end [2025-03-02 09:49:17] Production.INFO: ProcessCDR(1,14590319,1,1,2) [2025-03-02 09:49:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590319,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:49:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590319,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:49:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590319,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:49:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590319,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:49:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590319', 'tblTempUsageDetail_20' ) start [2025-03-02 09:49:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590319', 'tblTempUsageDetail_20' ) end [2025-03-02 09:49:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:49:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:49:21] Production.INFO: ==31766== Releasing lock... [2025-03-02 09:49:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:49:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:50:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:50:06 [end_date_ymd] => 2025-03-02 09:50:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:50:06' and `end` < '2025-03-02 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-03-02 09:50:18] Production.INFO: count ==183 [2025-03-02 09:50:18] Production.ERROR: pbx CDR StartTime 2025-03-02 06:50:06 - End Time 2025-03-02 09:50:06 [2025-03-02 09:50:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590325', 'tblTempUsageDetail_20' ) start [2025-03-02 09:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590325', 'tblTempUsageDetail_20' ) end [2025-03-02 09:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590325', 'tblTempVendorCDR_20' ) start [2025-03-02 09:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590325', 'tblTempVendorCDR_20' ) end [2025-03-02 09:50:18] Production.INFO: ProcessCDR(1,14590325,1,1,2) [2025-03-02 09:50:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590325,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:50:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590325,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:50:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590325,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:50:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590325,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:50:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590325', 'tblTempUsageDetail_20' ) start [2025-03-02 09:50:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590325', 'tblTempUsageDetail_20' ) end [2025-03-02 09:50:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:50:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:50:21] Production.INFO: ==31841== Releasing lock... [2025-03-02 09:50:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:50:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 09:51:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:51:06 [end_date_ymd] => 2025-03-02 09:51:06 [RateCDR] => 1 ) [2025-03-02 09: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-03-02 06:51:06' and `end` < '2025-03-02 09: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-03-02 09:51:18] Production.INFO: count ==183 [2025-03-02 09:51:18] Production.ERROR: pbx CDR StartTime 2025-03-02 06:51:06 - End Time 2025-03-02 09:51:06 [2025-03-02 09:51:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590330', 'tblTempUsageDetail_20' ) start [2025-03-02 09:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590330', 'tblTempUsageDetail_20' ) end [2025-03-02 09:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590330', 'tblTempVendorCDR_20' ) start [2025-03-02 09:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590330', 'tblTempVendorCDR_20' ) end [2025-03-02 09:51:18] Production.INFO: ProcessCDR(1,14590330,1,1,2) [2025-03-02 09:51:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590330,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:51:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590330,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:51:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590330,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:51:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590330,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:51:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590330', 'tblTempUsageDetail_20' ) start [2025-03-02 09:51:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590330', 'tblTempUsageDetail_20' ) end [2025-03-02 09:51:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:51:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:51:21] Production.INFO: ==31930== Releasing lock... [2025-03-02 09:51:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:51:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 09:52:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:52:05 [end_date_ymd] => 2025-03-02 09:52:05 [RateCDR] => 1 ) [2025-03-02 09: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-03-02 06:52:05' and `end` < '2025-03-02 09: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-03-02 09:52:17] Production.INFO: count ==179 [2025-03-02 09:52:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:52:05 - End Time 2025-03-02 09:52:05 [2025-03-02 09:52:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590335', 'tblTempUsageDetail_20' ) start [2025-03-02 09:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590335', 'tblTempUsageDetail_20' ) end [2025-03-02 09:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590335', 'tblTempVendorCDR_20' ) start [2025-03-02 09:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590335', 'tblTempVendorCDR_20' ) end [2025-03-02 09:52:17] Production.INFO: ProcessCDR(1,14590335,1,1,2) [2025-03-02 09:52:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590335,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:52:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590335,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:52:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590335,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:52:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590335,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:52:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590335', 'tblTempUsageDetail_20' ) start [2025-03-02 09:52:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590335', 'tblTempUsageDetail_20' ) end [2025-03-02 09:52:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:52:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:52:20] Production.INFO: ==32006== Releasing lock... [2025-03-02 09:52:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:52:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 09:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:53:05 [end_date_ymd] => 2025-03-02 09:53:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:53:05' and `end` < '2025-03-02 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-03-02 09:53:17] Production.INFO: count ==178 [2025-03-02 09:53:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:53:05 - End Time 2025-03-02 09:53:05 [2025-03-02 09:53:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590340', 'tblTempUsageDetail_20' ) start [2025-03-02 09:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590340', 'tblTempUsageDetail_20' ) end [2025-03-02 09:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590340', 'tblTempVendorCDR_20' ) start [2025-03-02 09:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590340', 'tblTempVendorCDR_20' ) end [2025-03-02 09:53:17] Production.INFO: ProcessCDR(1,14590340,1,1,2) [2025-03-02 09:53:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590340,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:53:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590340,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:53:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590340,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:53:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590340,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590340', 'tblTempUsageDetail_20' ) start [2025-03-02 09:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590340', 'tblTempUsageDetail_20' ) end [2025-03-02 09:53:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:53:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:53:21] Production.INFO: ==32086== Releasing lock... [2025-03-02 09:53:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:53:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 09:54:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:54:05 [end_date_ymd] => 2025-03-02 09:54:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:54:05' and `end` < '2025-03-02 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-03-02 09:54:17] Production.INFO: count ==176 [2025-03-02 09:54:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:54:05 - End Time 2025-03-02 09:54:05 [2025-03-02 09:54:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590345', 'tblTempUsageDetail_20' ) start [2025-03-02 09:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590345', 'tblTempUsageDetail_20' ) end [2025-03-02 09:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590345', 'tblTempVendorCDR_20' ) start [2025-03-02 09:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590345', 'tblTempVendorCDR_20' ) end [2025-03-02 09:54:17] Production.INFO: ProcessCDR(1,14590345,1,1,2) [2025-03-02 09:54:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590345,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:54:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590345,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:54:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590345,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:54:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590345,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:54:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590345', 'tblTempUsageDetail_20' ) start [2025-03-02 09:54:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590345', 'tblTempUsageDetail_20' ) end [2025-03-02 09:54:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:54:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:54:20] Production.INFO: ==32164== Releasing lock... [2025-03-02 09:54:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:54:20] Production.INFO: 29 MB #Memory Used# [2025-03-02 09:55:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:55:05 [end_date_ymd] => 2025-03-02 09:55:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:55:05' and `end` < '2025-03-02 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-03-02 09:55:17] Production.INFO: count ==175 [2025-03-02 09:55:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:55:05 - End Time 2025-03-02 09:55:05 [2025-03-02 09:55:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590350', 'tblTempUsageDetail_20' ) start [2025-03-02 09:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590350', 'tblTempUsageDetail_20' ) end [2025-03-02 09:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590350', 'tblTempVendorCDR_20' ) start [2025-03-02 09:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590350', 'tblTempVendorCDR_20' ) end [2025-03-02 09:55:17] Production.INFO: ProcessCDR(1,14590350,1,1,2) [2025-03-02 09:55:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590350,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:55:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590350,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:55:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590350,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:55:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590350,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590350', 'tblTempUsageDetail_20' ) start [2025-03-02 09:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590350', 'tblTempUsageDetail_20' ) end [2025-03-02 09:55:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:55:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:55:21] Production.INFO: ==32242== Releasing lock... [2025-03-02 09:55:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:55:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 09:56:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:56:06 [end_date_ymd] => 2025-03-02 09:56:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:56:06' and `end` < '2025-03-02 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-03-02 09:56:18] Production.INFO: count ==187 [2025-03-02 09:56:18] Production.ERROR: pbx CDR StartTime 2025-03-02 06:56:06 - End Time 2025-03-02 09:56:06 [2025-03-02 09:56:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590355', 'tblTempUsageDetail_20' ) start [2025-03-02 09:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590355', 'tblTempUsageDetail_20' ) end [2025-03-02 09:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590355', 'tblTempVendorCDR_20' ) start [2025-03-02 09:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590355', 'tblTempVendorCDR_20' ) end [2025-03-02 09:56:18] Production.INFO: ProcessCDR(1,14590355,1,1,2) [2025-03-02 09:56:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590355,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:56:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590355,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:56:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590355,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:56:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590355,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:56:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590355', 'tblTempUsageDetail_20' ) start [2025-03-02 09:56:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590355', 'tblTempUsageDetail_20' ) end [2025-03-02 09:56:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:56:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:56:21] Production.INFO: ==32359== Releasing lock... [2025-03-02 09:56:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:56:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:57:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:57:05 [end_date_ymd] => 2025-03-02 09:57:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:57:05' and `end` < '2025-03-02 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-03-02 09:57:17] Production.INFO: count ==187 [2025-03-02 09:57:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:57:05 - End Time 2025-03-02 09:57:05 [2025-03-02 09:57:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590360', 'tblTempUsageDetail_20' ) start [2025-03-02 09:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590360', 'tblTempUsageDetail_20' ) end [2025-03-02 09:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590360', 'tblTempVendorCDR_20' ) start [2025-03-02 09:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590360', 'tblTempVendorCDR_20' ) end [2025-03-02 09:57:17] Production.INFO: ProcessCDR(1,14590360,1,1,2) [2025-03-02 09:57:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590360,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:57:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590360,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:57:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590360,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:57:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590360,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:57:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590360', 'tblTempUsageDetail_20' ) start [2025-03-02 09:57:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590360', 'tblTempUsageDetail_20' ) end [2025-03-02 09:57:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:57:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:57:20] Production.INFO: ==32445== Releasing lock... [2025-03-02 09:57:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:57:21] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:58:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:58:05 [end_date_ymd] => 2025-03-02 09:58:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 06:58:05' and `end` < '2025-03-02 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-03-02 09:58:17] Production.INFO: count ==187 [2025-03-02 09:58:17] Production.ERROR: pbx CDR StartTime 2025-03-02 06:58:05 - End Time 2025-03-02 09:58:05 [2025-03-02 09:58:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590365', 'tblTempUsageDetail_20' ) start [2025-03-02 09:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590365', 'tblTempUsageDetail_20' ) end [2025-03-02 09:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590365', 'tblTempVendorCDR_20' ) start [2025-03-02 09:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590365', 'tblTempVendorCDR_20' ) end [2025-03-02 09:58:17] Production.INFO: ProcessCDR(1,14590365,1,1,2) [2025-03-02 09:58:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590365,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:58:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590365,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:58:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590365,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:58:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590365,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:58:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590365', 'tblTempUsageDetail_20' ) start [2025-03-02 09:58:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590365', 'tblTempUsageDetail_20' ) end [2025-03-02 09:58:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:58:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:58:20] Production.INFO: ==32515== Releasing lock... [2025-03-02 09:58:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:58:20] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 09:59:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 06:59:06 [end_date_ymd] => 2025-03-02 09:59:06 [RateCDR] => 1 ) [2025-03-02 09: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-03-02 06:59:06' and `end` < '2025-03-02 09: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-03-02 09:59:18] Production.INFO: count ==193 [2025-03-02 09:59:18] Production.ERROR: pbx CDR StartTime 2025-03-02 06:59:06 - End Time 2025-03-02 09:59:06 [2025-03-02 09:59:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 09:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590370', 'tblTempUsageDetail_20' ) start [2025-03-02 09:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590370', 'tblTempUsageDetail_20' ) end [2025-03-02 09:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590370', 'tblTempVendorCDR_20' ) start [2025-03-02 09:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590370', 'tblTempVendorCDR_20' ) end [2025-03-02 09:59:18] Production.INFO: ProcessCDR(1,14590370,1,1,2) [2025-03-02 09:59:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590370,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:59:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590370,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 09:59:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590370,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:59:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590370,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 09:59:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590370', 'tblTempUsageDetail_20' ) start [2025-03-02 09:59:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590370', 'tblTempUsageDetail_20' ) end [2025-03-02 09:59:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 09:59:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 09:59:22] Production.INFO: ==32585== Releasing lock... [2025-03-02 09:59:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 09:59:22] Production.INFO: 29 MB #Memory Used# [2025-03-02 10:00:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:00:06 [end_date_ymd] => 2025-03-02 10:00:06 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:00:06' and `end` < '2025-03-02 10: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-03-02 10:00:18] Production.INFO: count ==193 [2025-03-02 10:00:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:00:06 - End Time 2025-03-02 10:00:06 [2025-03-02 10:00:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590376', 'tblTempUsageDetail_20' ) start [2025-03-02 10:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590376', 'tblTempUsageDetail_20' ) end [2025-03-02 10:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590376', 'tblTempVendorCDR_20' ) start [2025-03-02 10:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590376', 'tblTempVendorCDR_20' ) end [2025-03-02 10:00:18] Production.INFO: ProcessCDR(1,14590376,1,1,2) [2025-03-02 10:00:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590376,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:00:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590376,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:00:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590376,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:00:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590376,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:00:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590376', 'tblTempUsageDetail_20' ) start [2025-03-02 10:00:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590376', 'tblTempUsageDetail_20' ) end [2025-03-02 10:00:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:00:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:00:21] Production.INFO: ==32667== Releasing lock... [2025-03-02 10:00:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:00:21] Production.INFO: 29 MB #Memory Used# [2025-03-02 10:01:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:01:05 [end_date_ymd] => 2025-03-02 10:01:05 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:01:05' and `end` < '2025-03-02 10: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-03-02 10:01:17] Production.INFO: count ==191 [2025-03-02 10:01:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:01:05 - End Time 2025-03-02 10:01:05 [2025-03-02 10:01:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590381', 'tblTempUsageDetail_20' ) start [2025-03-02 10:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590381', 'tblTempUsageDetail_20' ) end [2025-03-02 10:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590381', 'tblTempVendorCDR_20' ) start [2025-03-02 10:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590381', 'tblTempVendorCDR_20' ) end [2025-03-02 10:01:18] Production.INFO: ProcessCDR(1,14590381,1,1,2) [2025-03-02 10:01:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590381,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:01:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590381,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:01:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590381,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:01:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590381,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:01:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590381', 'tblTempUsageDetail_20' ) start [2025-03-02 10:01:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590381', 'tblTempUsageDetail_20' ) end [2025-03-02 10:01:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:01:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:01:22] Production.INFO: ==32762== Releasing lock... [2025-03-02 10:01:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:01:22] Production.INFO: 29.25 MB #Memory Used# [2025-03-02 10:02:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:02:06 [end_date_ymd] => 2025-03-02 10:02:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 07:02:06' and `end` < '2025-03-02 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-03-02 10:02:18] Production.INFO: count ==192 [2025-03-02 10:02:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:02:06 - End Time 2025-03-02 10:02:06 [2025-03-02 10:02:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590386', 'tblTempUsageDetail_20' ) start [2025-03-02 10:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590386', 'tblTempUsageDetail_20' ) end [2025-03-02 10:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590386', 'tblTempVendorCDR_20' ) start [2025-03-02 10:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590386', 'tblTempVendorCDR_20' ) end [2025-03-02 10:02:18] Production.INFO: ProcessCDR(1,14590386,1,1,2) [2025-03-02 10:02:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590386,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:02:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590386,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:02:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590386,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:02:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590386,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:02:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590386', 'tblTempUsageDetail_20' ) start [2025-03-02 10:02:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590386', 'tblTempUsageDetail_20' ) end [2025-03-02 10:02:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:02:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:02:23] Production.INFO: ==392== Releasing lock... [2025-03-02 10:02:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:02:23] Production.INFO: 29 MB #Memory Used# [2025-03-02 10:03:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:03:06 [end_date_ymd] => 2025-03-02 10:03:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 07:03:06' and `end` < '2025-03-02 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-03-02 10:03:18] Production.INFO: count ==193 [2025-03-02 10:03:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:03:06 - End Time 2025-03-02 10:03:06 [2025-03-02 10:03:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590391', 'tblTempUsageDetail_20' ) start [2025-03-02 10:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590391', 'tblTempUsageDetail_20' ) end [2025-03-02 10:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590391', 'tblTempVendorCDR_20' ) start [2025-03-02 10:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590391', 'tblTempVendorCDR_20' ) end [2025-03-02 10:03:18] Production.INFO: ProcessCDR(1,14590391,1,1,2) [2025-03-02 10:03:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590391,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:03:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590391,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:03:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590391,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:03:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590391,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:03:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590391', 'tblTempUsageDetail_20' ) start [2025-03-02 10:03:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590391', 'tblTempUsageDetail_20' ) end [2025-03-02 10:03:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:03:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:03:23] Production.INFO: ==469== Releasing lock... [2025-03-02 10:03:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:03:23] Production.INFO: 29 MB #Memory Used# [2025-03-02 10:04:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:04:05 [end_date_ymd] => 2025-03-02 10:04:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 07:04:05' and `end` < '2025-03-02 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-03-02 10:04:17] Production.INFO: count ==194 [2025-03-02 10:04:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:04:05 - End Time 2025-03-02 10:04:05 [2025-03-02 10:04:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590396', 'tblTempUsageDetail_20' ) start [2025-03-02 10:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590396', 'tblTempUsageDetail_20' ) end [2025-03-02 10:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590396', 'tblTempVendorCDR_20' ) start [2025-03-02 10:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590396', 'tblTempVendorCDR_20' ) end [2025-03-02 10:04:17] Production.INFO: ProcessCDR(1,14590396,1,1,2) [2025-03-02 10:04:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590396,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:04:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590396,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:04:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590396,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:04:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590396,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:04:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590396', 'tblTempUsageDetail_20' ) start [2025-03-02 10:04:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590396', 'tblTempUsageDetail_20' ) end [2025-03-02 10:04:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:04:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:04:23] Production.INFO: ==554== Releasing lock... [2025-03-02 10:04:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:04:23] Production.INFO: 29 MB #Memory Used# [2025-03-02 10:05:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:05:06 [end_date_ymd] => 2025-03-02 10:05:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 07:05:06' and `end` < '2025-03-02 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-03-02 10:05:18] Production.INFO: count ==203 [2025-03-02 10:05:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:05:06 - End Time 2025-03-02 10:05:06 [2025-03-02 10:05:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590401', 'tblTempUsageDetail_20' ) start [2025-03-02 10:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590401', 'tblTempUsageDetail_20' ) end [2025-03-02 10:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590401', 'tblTempVendorCDR_20' ) start [2025-03-02 10:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590401', 'tblTempVendorCDR_20' ) end [2025-03-02 10:05:18] Production.INFO: ProcessCDR(1,14590401,1,1,2) [2025-03-02 10:05:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590401,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:05:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590401,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:05:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590401,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:05:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590401,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:05:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590401', 'tblTempUsageDetail_20' ) start [2025-03-02 10:05:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590401', 'tblTempUsageDetail_20' ) end [2025-03-02 10:05:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:05:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:05:23] Production.INFO: ==649== Releasing lock... [2025-03-02 10:05:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:05:23] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 10:06:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:06:05 [end_date_ymd] => 2025-03-02 10:06:05 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:06:05' and `end` < '2025-03-02 10: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-03-02 10:06:17] Production.INFO: count ==209 [2025-03-02 10:06:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:06:05 - End Time 2025-03-02 10:06:05 [2025-03-02 10:06:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590406', 'tblTempUsageDetail_20' ) start [2025-03-02 10:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590406', 'tblTempUsageDetail_20' ) end [2025-03-02 10:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590406', 'tblTempVendorCDR_20' ) start [2025-03-02 10:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590406', 'tblTempVendorCDR_20' ) end [2025-03-02 10:06:17] Production.INFO: ProcessCDR(1,14590406,1,1,2) [2025-03-02 10:06:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590406,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:06:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590406,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:06:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590406,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:06:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590406,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:06:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590406', 'tblTempUsageDetail_20' ) start [2025-03-02 10:06:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590406', 'tblTempUsageDetail_20' ) end [2025-03-02 10:06:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:06:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:06:22] Production.INFO: ==755== Releasing lock... [2025-03-02 10:06:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:06:22] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 10:07:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:07:06 [end_date_ymd] => 2025-03-02 10:07:06 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:07:06' and `end` < '2025-03-02 10: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-03-02 10:07:17] Production.INFO: count ==210 [2025-03-02 10:07:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:07:06 - End Time 2025-03-02 10:07:06 [2025-03-02 10:07:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590411', 'tblTempUsageDetail_20' ) start [2025-03-02 10:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590411', 'tblTempUsageDetail_20' ) end [2025-03-02 10:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590411', 'tblTempVendorCDR_20' ) start [2025-03-02 10:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590411', 'tblTempVendorCDR_20' ) end [2025-03-02 10:07:18] Production.INFO: ProcessCDR(1,14590411,1,1,2) [2025-03-02 10:07:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590411,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:07:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590411,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:07:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590411,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:07:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590411,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:07:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590411', 'tblTempUsageDetail_20' ) start [2025-03-02 10:07:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590411', 'tblTempUsageDetail_20' ) end [2025-03-02 10:07:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:07:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:07:23] Production.INFO: ==827== Releasing lock... [2025-03-02 10:07:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:07:23] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 10:08:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:08:06 [end_date_ymd] => 2025-03-02 10:08:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 07:08:06' and `end` < '2025-03-02 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-03-02 10:08:18] Production.INFO: count ==210 [2025-03-02 10:08:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:08:06 - End Time 2025-03-02 10:08:06 [2025-03-02 10:08:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590416', 'tblTempUsageDetail_20' ) start [2025-03-02 10:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590416', 'tblTempUsageDetail_20' ) end [2025-03-02 10:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590416', 'tblTempVendorCDR_20' ) start [2025-03-02 10:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590416', 'tblTempVendorCDR_20' ) end [2025-03-02 10:08:18] Production.INFO: ProcessCDR(1,14590416,1,1,2) [2025-03-02 10:08:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590416,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:08:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590416,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:08:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590416,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:08:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590416,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:08:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590416', 'tblTempUsageDetail_20' ) start [2025-03-02 10:08:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590416', 'tblTempUsageDetail_20' ) end [2025-03-02 10:08:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:08:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:08:22] Production.INFO: ==907== Releasing lock... [2025-03-02 10:08:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:08:22] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 10:09:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:09:06 [end_date_ymd] => 2025-03-02 10:09:06 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:09:06' and `end` < '2025-03-02 10: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-03-02 10:09:18] Production.INFO: count ==211 [2025-03-02 10:09:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:09:06 - End Time 2025-03-02 10:09:06 [2025-03-02 10:09:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590421', 'tblTempUsageDetail_20' ) start [2025-03-02 10:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590421', 'tblTempUsageDetail_20' ) end [2025-03-02 10:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590421', 'tblTempVendorCDR_20' ) start [2025-03-02 10:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590421', 'tblTempVendorCDR_20' ) end [2025-03-02 10:09:18] Production.INFO: ProcessCDR(1,14590421,1,1,2) [2025-03-02 10:09:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590421,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:09:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590421,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:09:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590421,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:09:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590421,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:09:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590421', 'tblTempUsageDetail_20' ) start [2025-03-02 10:09:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590421', 'tblTempUsageDetail_20' ) end [2025-03-02 10:09:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:09:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:09:23] Production.INFO: ==986== Releasing lock... [2025-03-02 10:09:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:09:23] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 10:10:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:10:06 [end_date_ymd] => 2025-03-02 10:10:06 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:10:06' and `end` < '2025-03-02 10: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-03-02 10:10:18] Production.INFO: count ==209 [2025-03-02 10:10:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:10:06 - End Time 2025-03-02 10:10:06 [2025-03-02 10:10:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590427', 'tblTempUsageDetail_20' ) start [2025-03-02 10:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590427', 'tblTempUsageDetail_20' ) end [2025-03-02 10:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590427', 'tblTempVendorCDR_20' ) start [2025-03-02 10:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590427', 'tblTempVendorCDR_20' ) end [2025-03-02 10:10:18] Production.INFO: ProcessCDR(1,14590427,1,1,2) [2025-03-02 10:10:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590427,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:10:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590427,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:10:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590427,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:10:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590427,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:10:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590427', 'tblTempUsageDetail_20' ) start [2025-03-02 10:10:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590427', 'tblTempUsageDetail_20' ) end [2025-03-02 10:10:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:10:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:10:22] Production.INFO: ==1061== Releasing lock... [2025-03-02 10:10:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:10:22] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 10:11:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:11:06 [end_date_ymd] => 2025-03-02 10:11:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 07:11:06' and `end` < '2025-03-02 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-03-02 10:11:18] Production.INFO: count ==206 [2025-03-02 10:11:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:11:06 - End Time 2025-03-02 10:11:06 [2025-03-02 10:11:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:11:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590432', 'tblTempUsageDetail_20' ) start [2025-03-02 10:11:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590432', 'tblTempUsageDetail_20' ) end [2025-03-02 10:11:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590432', 'tblTempVendorCDR_20' ) start [2025-03-02 10:11:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590432', 'tblTempVendorCDR_20' ) end [2025-03-02 10:11:18] Production.INFO: ProcessCDR(1,14590432,1,1,2) [2025-03-02 10:11:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590432,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:11:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590432,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:11:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590432,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:11:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590432,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:11:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590432', 'tblTempUsageDetail_20' ) start [2025-03-02 10:11:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590432', 'tblTempUsageDetail_20' ) end [2025-03-02 10:11:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:11:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:11:21] Production.INFO: ==1146== Releasing lock... [2025-03-02 10:11:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:11:21] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 10:12:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:12:05 [end_date_ymd] => 2025-03-02 10:12:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 07:12:05' and `end` < '2025-03-02 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-03-02 10:12:17] Production.INFO: count ==206 [2025-03-02 10:12:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:12:05 - End Time 2025-03-02 10:12:05 [2025-03-02 10:12:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590437', 'tblTempUsageDetail_20' ) start [2025-03-02 10:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590437', 'tblTempUsageDetail_20' ) end [2025-03-02 10:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590437', 'tblTempVendorCDR_20' ) start [2025-03-02 10:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590437', 'tblTempVendorCDR_20' ) end [2025-03-02 10:12:17] Production.INFO: ProcessCDR(1,14590437,1,1,2) [2025-03-02 10:12:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590437,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:12:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590437,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:12:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590437,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:12:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590437,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:12:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590437', 'tblTempUsageDetail_20' ) start [2025-03-02 10:12:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590437', 'tblTempUsageDetail_20' ) end [2025-03-02 10:12:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:12:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:12:21] Production.INFO: ==1284== Releasing lock... [2025-03-02 10:12:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:12:21] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 10:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:13:05 [end_date_ymd] => 2025-03-02 10:13:05 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:13:05' and `end` < '2025-03-02 10: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-03-02 10:13:17] Production.INFO: count ==206 [2025-03-02 10:13:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:13:05 - End Time 2025-03-02 10:13:05 [2025-03-02 10:13:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590442', 'tblTempUsageDetail_20' ) start [2025-03-02 10:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590442', 'tblTempUsageDetail_20' ) end [2025-03-02 10:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590442', 'tblTempVendorCDR_20' ) start [2025-03-02 10:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590442', 'tblTempVendorCDR_20' ) end [2025-03-02 10:13:17] Production.INFO: ProcessCDR(1,14590442,1,1,2) [2025-03-02 10:13:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590442,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:13:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590442,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:13:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590442,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:13:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590442,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:13:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590442', 'tblTempUsageDetail_20' ) start [2025-03-02 10:13:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590442', 'tblTempUsageDetail_20' ) end [2025-03-02 10:13:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:13:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:13:21] Production.INFO: ==1382== Releasing lock... [2025-03-02 10:13:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:13:21] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 10:14:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:14:06 [end_date_ymd] => 2025-03-02 10:14:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 07:14:06' and `end` < '2025-03-02 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-03-02 10:14:18] Production.INFO: count ==206 [2025-03-02 10:14:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:14:06 - End Time 2025-03-02 10:14:06 [2025-03-02 10:14:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590447', 'tblTempUsageDetail_20' ) start [2025-03-02 10:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590447', 'tblTempUsageDetail_20' ) end [2025-03-02 10:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590447', 'tblTempVendorCDR_20' ) start [2025-03-02 10:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590447', 'tblTempVendorCDR_20' ) end [2025-03-02 10:14:18] Production.INFO: ProcessCDR(1,14590447,1,1,2) [2025-03-02 10:14:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590447,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:14:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590447,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:14:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590447,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:14:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590447,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:14:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590447', 'tblTempUsageDetail_20' ) start [2025-03-02 10:14:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590447', 'tblTempUsageDetail_20' ) end [2025-03-02 10:14:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:14:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:14:22] Production.INFO: ==1462== Releasing lock... [2025-03-02 10:14:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:14:22] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 10:15:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:15:06 [end_date_ymd] => 2025-03-02 10:15:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 07:15:06' and `end` < '2025-03-02 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-03-02 10:15:18] Production.INFO: count ==206 [2025-03-02 10:15:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:15:06 - End Time 2025-03-02 10:15:06 [2025-03-02 10:15:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590452', 'tblTempUsageDetail_20' ) start [2025-03-02 10:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590452', 'tblTempUsageDetail_20' ) end [2025-03-02 10:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590452', 'tblTempVendorCDR_20' ) start [2025-03-02 10:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590452', 'tblTempVendorCDR_20' ) end [2025-03-02 10:15:18] Production.INFO: ProcessCDR(1,14590452,1,1,2) [2025-03-02 10:15:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590452,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:15:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590452,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:15:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590452,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:15:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590452,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:15:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590452', 'tblTempUsageDetail_20' ) start [2025-03-02 10:15:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590452', 'tblTempUsageDetail_20' ) end [2025-03-02 10:15:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:15:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:15:21] Production.INFO: ==1589== Releasing lock... [2025-03-02 10:15:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:15:21] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 10:16:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:16:06 [end_date_ymd] => 2025-03-02 10:16:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 07:16:06' and `end` < '2025-03-02 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-03-02 10:16:18] Production.INFO: count ==214 [2025-03-02 10:16:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:16:06 - End Time 2025-03-02 10:16:06 [2025-03-02 10:16:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590457', 'tblTempUsageDetail_20' ) start [2025-03-02 10:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590457', 'tblTempUsageDetail_20' ) end [2025-03-02 10:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590457', 'tblTempVendorCDR_20' ) start [2025-03-02 10:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590457', 'tblTempVendorCDR_20' ) end [2025-03-02 10:16:18] Production.INFO: ProcessCDR(1,14590457,1,1,2) [2025-03-02 10:16:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590457,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:16:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590457,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:16:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590457,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:16:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590457,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590457', 'tblTempUsageDetail_20' ) start [2025-03-02 10:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590457', 'tblTempUsageDetail_20' ) end [2025-03-02 10:16:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:16:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:16:21] Production.INFO: ==1673== Releasing lock... [2025-03-02 10:16:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:16:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 10:17:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:17:05 [end_date_ymd] => 2025-03-02 10:17:05 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:17:05' and `end` < '2025-03-02 10: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-03-02 10:17:17] Production.INFO: count ==214 [2025-03-02 10:17:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:17:05 - End Time 2025-03-02 10:17:05 [2025-03-02 10:17:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590462', 'tblTempUsageDetail_20' ) start [2025-03-02 10:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590462', 'tblTempUsageDetail_20' ) end [2025-03-02 10:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590462', 'tblTempVendorCDR_20' ) start [2025-03-02 10:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590462', 'tblTempVendorCDR_20' ) end [2025-03-02 10:17:17] Production.INFO: ProcessCDR(1,14590462,1,1,2) [2025-03-02 10:17:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590462,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:17:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590462,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:17:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590462,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:17:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590462,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590462', 'tblTempUsageDetail_20' ) start [2025-03-02 10:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590462', 'tblTempUsageDetail_20' ) end [2025-03-02 10:17:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:17:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:17:21] Production.INFO: ==1759== Releasing lock... [2025-03-02 10:17:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:17:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 10:18:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:18:06 [end_date_ymd] => 2025-03-02 10:18:06 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:18:06' and `end` < '2025-03-02 10: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-03-02 10:18:18] Production.INFO: count ==214 [2025-03-02 10:18:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:18:06 - End Time 2025-03-02 10:18:06 [2025-03-02 10:18:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590467', 'tblTempUsageDetail_20' ) start [2025-03-02 10:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590467', 'tblTempUsageDetail_20' ) end [2025-03-02 10:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590467', 'tblTempVendorCDR_20' ) start [2025-03-02 10:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590467', 'tblTempVendorCDR_20' ) end [2025-03-02 10:18:18] Production.INFO: ProcessCDR(1,14590467,1,1,2) [2025-03-02 10:18:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590467,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:18:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590467,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:18:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590467,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:18:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590467,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590467', 'tblTempUsageDetail_20' ) start [2025-03-02 10:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590467', 'tblTempUsageDetail_20' ) end [2025-03-02 10:18:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:18:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:18:21] Production.INFO: ==1857== Releasing lock... [2025-03-02 10:18:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:18:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 10:19:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:19:05 [end_date_ymd] => 2025-03-02 10:19:05 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:19:05' and `end` < '2025-03-02 10: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-03-02 10:19:17] Production.INFO: count ==214 [2025-03-02 10:19:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:19:05 - End Time 2025-03-02 10:19:05 [2025-03-02 10:19:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590472', 'tblTempUsageDetail_20' ) start [2025-03-02 10:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590472', 'tblTempUsageDetail_20' ) end [2025-03-02 10:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590472', 'tblTempVendorCDR_20' ) start [2025-03-02 10:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590472', 'tblTempVendorCDR_20' ) end [2025-03-02 10:19:17] Production.INFO: ProcessCDR(1,14590472,1,1,2) [2025-03-02 10:19:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590472,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:19:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590472,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:19:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590472,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:19:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590472,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:19:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590472', 'tblTempUsageDetail_20' ) start [2025-03-02 10:19:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590472', 'tblTempUsageDetail_20' ) end [2025-03-02 10:19:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:19:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:19:21] Production.INFO: ==1945== Releasing lock... [2025-03-02 10:19:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:19:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 10:20:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:20:06 [end_date_ymd] => 2025-03-02 10:20:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 07:20:06' and `end` < '2025-03-02 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-03-02 10:20:18] Production.INFO: count ==218 [2025-03-02 10:20:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:20:06 - End Time 2025-03-02 10:20:06 [2025-03-02 10:20:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590477', 'tblTempUsageDetail_20' ) start [2025-03-02 10:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590477', 'tblTempUsageDetail_20' ) end [2025-03-02 10:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590477', 'tblTempVendorCDR_20' ) start [2025-03-02 10:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590477', 'tblTempVendorCDR_20' ) end [2025-03-02 10:20:18] Production.INFO: ProcessCDR(1,14590477,1,1,2) [2025-03-02 10:20:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590477,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:20:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590477,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:20:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590477,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:20:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590477,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:20:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590477', 'tblTempUsageDetail_20' ) start [2025-03-02 10:20:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590477', 'tblTempUsageDetail_20' ) end [2025-03-02 10:20:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:20:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:20:21] Production.INFO: ==2027== Releasing lock... [2025-03-02 10:20:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:20:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 10:21:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:21:05 [end_date_ymd] => 2025-03-02 10:21:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 07:21:05' and `end` < '2025-03-02 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-03-02 10:21:17] Production.INFO: count ==240 [2025-03-02 10:21:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:21:05 - End Time 2025-03-02 10:21:05 [2025-03-02 10:21:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590483', 'tblTempUsageDetail_20' ) start [2025-03-02 10:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590483', 'tblTempUsageDetail_20' ) end [2025-03-02 10:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590483', 'tblTempVendorCDR_20' ) start [2025-03-02 10:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590483', 'tblTempVendorCDR_20' ) end [2025-03-02 10:21:17] Production.INFO: ProcessCDR(1,14590483,1,1,2) [2025-03-02 10:21:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590483,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:21:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590483,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:21:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590483,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:21:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590483,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:21:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590483', 'tblTempUsageDetail_20' ) start [2025-03-02 10:21:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590483', 'tblTempUsageDetail_20' ) end [2025-03-02 10:21:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:21:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:21:20] Production.INFO: ==2104== Releasing lock... [2025-03-02 10:21:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:21:20] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 10:22:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:22:06 [end_date_ymd] => 2025-03-02 10:22:06 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:22:06' and `end` < '2025-03-02 10: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-03-02 10:22:18] Production.INFO: count ==240 [2025-03-02 10:22:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:22:06 - End Time 2025-03-02 10:22:06 [2025-03-02 10:22:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590488', 'tblTempUsageDetail_20' ) start [2025-03-02 10:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590488', 'tblTempUsageDetail_20' ) end [2025-03-02 10:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590488', 'tblTempVendorCDR_20' ) start [2025-03-02 10:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590488', 'tblTempVendorCDR_20' ) end [2025-03-02 10:22:18] Production.INFO: ProcessCDR(1,14590488,1,1,2) [2025-03-02 10:22:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590488,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:22:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590488,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:22:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590488,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:22:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590488,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590488', 'tblTempUsageDetail_20' ) start [2025-03-02 10:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590488', 'tblTempUsageDetail_20' ) end [2025-03-02 10:22:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:22:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:22:21] Production.INFO: ==2182== Releasing lock... [2025-03-02 10:22:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:22:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 10:23:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:23:05 [end_date_ymd] => 2025-03-02 10:23:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 07:23:05' and `end` < '2025-03-02 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-03-02 10:23:17] Production.INFO: count ==244 [2025-03-02 10:23:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:23:05 - End Time 2025-03-02 10:23:05 [2025-03-02 10:23:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590493', 'tblTempUsageDetail_20' ) start [2025-03-02 10:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590493', 'tblTempUsageDetail_20' ) end [2025-03-02 10:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590493', 'tblTempVendorCDR_20' ) start [2025-03-02 10:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590493', 'tblTempVendorCDR_20' ) end [2025-03-02 10:23:17] Production.INFO: ProcessCDR(1,14590493,1,1,2) [2025-03-02 10:23:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590493,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:23:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590493,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:23:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590493,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:23:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590493,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:23:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590493', 'tblTempUsageDetail_20' ) start [2025-03-02 10:23:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590493', 'tblTempUsageDetail_20' ) end [2025-03-02 10:23:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:23:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:23:21] Production.INFO: ==2303== Releasing lock... [2025-03-02 10:23:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:23:21] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 10:24:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:24:05 [end_date_ymd] => 2025-03-02 10:24:05 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:24:05' and `end` < '2025-03-02 10: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-03-02 10:24:17] Production.INFO: count ==248 [2025-03-02 10:24:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:24:05 - End Time 2025-03-02 10:24:05 [2025-03-02 10:24:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590498', 'tblTempUsageDetail_20' ) start [2025-03-02 10:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590498', 'tblTempUsageDetail_20' ) end [2025-03-02 10:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590498', 'tblTempVendorCDR_20' ) start [2025-03-02 10:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590498', 'tblTempVendorCDR_20' ) end [2025-03-02 10:24:17] Production.INFO: ProcessCDR(1,14590498,1,1,2) [2025-03-02 10:24:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590498,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:24:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590498,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:24:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590498,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:24:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590498,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590498', 'tblTempUsageDetail_20' ) start [2025-03-02 10:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590498', 'tblTempUsageDetail_20' ) end [2025-03-02 10:24:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:24:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:24:21] Production.INFO: ==2394== Releasing lock... [2025-03-02 10:24:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:24:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 10:25:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:25:06 [end_date_ymd] => 2025-03-02 10:25:06 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:25:06' and `end` < '2025-03-02 10: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-03-02 10:25:18] Production.INFO: count ==248 [2025-03-02 10:25:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:25:06 - End Time 2025-03-02 10:25:06 [2025-03-02 10:25:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590503', 'tblTempUsageDetail_20' ) start [2025-03-02 10:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590503', 'tblTempUsageDetail_20' ) end [2025-03-02 10:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590503', 'tblTempVendorCDR_20' ) start [2025-03-02 10:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590503', 'tblTempVendorCDR_20' ) end [2025-03-02 10:25:18] Production.INFO: ProcessCDR(1,14590503,1,1,2) [2025-03-02 10:25:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590503,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:25:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590503,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:25:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590503,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:25:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590503,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590503', 'tblTempUsageDetail_20' ) start [2025-03-02 10:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590503', 'tblTempUsageDetail_20' ) end [2025-03-02 10:25:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:25:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:25:21] Production.INFO: ==2471== Releasing lock... [2025-03-02 10:25:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:25:21] Production.INFO: 29.5 MB #Memory Used# [2025-03-02 10:26:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:26:06 [end_date_ymd] => 2025-03-02 10:26:06 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:26:06' and `end` < '2025-03-02 10: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-03-02 10:26:18] Production.INFO: count ==250 [2025-03-02 10:26:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:26:06 - End Time 2025-03-02 10:26:06 [2025-03-02 10:26:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590508', 'tblTempUsageDetail_20' ) start [2025-03-02 10:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590508', 'tblTempUsageDetail_20' ) end [2025-03-02 10:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590508', 'tblTempVendorCDR_20' ) start [2025-03-02 10:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590508', 'tblTempVendorCDR_20' ) end [2025-03-02 10:26:18] Production.INFO: ProcessCDR(1,14590508,1,1,2) [2025-03-02 10:26:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590508,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:26:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590508,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:26:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590508,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:26:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590508,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:26:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590508', 'tblTempUsageDetail_20' ) start [2025-03-02 10:26:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590508', 'tblTempUsageDetail_20' ) end [2025-03-02 10:26:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:26:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:26:22] Production.INFO: ==2556== Releasing lock... [2025-03-02 10:26:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:26:22] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 10:27:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:27:05 [end_date_ymd] => 2025-03-02 10:27:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 07:27:05' and `end` < '2025-03-02 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-03-02 10:27:17] Production.INFO: count ==252 [2025-03-02 10:27:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:27:05 - End Time 2025-03-02 10:27:05 [2025-03-02 10:27:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590513', 'tblTempUsageDetail_20' ) start [2025-03-02 10:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590513', 'tblTempUsageDetail_20' ) end [2025-03-02 10:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590513', 'tblTempVendorCDR_20' ) start [2025-03-02 10:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590513', 'tblTempVendorCDR_20' ) end [2025-03-02 10:27:17] Production.INFO: ProcessCDR(1,14590513,1,1,2) [2025-03-02 10:27:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590513,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:27:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590513,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:27:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590513,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:27:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590513,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:27:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590513', 'tblTempUsageDetail_20' ) start [2025-03-02 10:27:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590513', 'tblTempUsageDetail_20' ) end [2025-03-02 10:27:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:27:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:27:21] Production.INFO: ==2683== Releasing lock... [2025-03-02 10:27:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:27:21] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 10:28:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:28:06 [end_date_ymd] => 2025-03-02 10:28:06 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:28:06' and `end` < '2025-03-02 10: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-03-02 10:28:18] Production.INFO: count ==254 [2025-03-02 10:28:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:28:06 - End Time 2025-03-02 10:28:06 [2025-03-02 10:28:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590518', 'tblTempUsageDetail_20' ) start [2025-03-02 10:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590518', 'tblTempUsageDetail_20' ) end [2025-03-02 10:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590518', 'tblTempVendorCDR_20' ) start [2025-03-02 10:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590518', 'tblTempVendorCDR_20' ) end [2025-03-02 10:28:18] Production.INFO: ProcessCDR(1,14590518,1,1,2) [2025-03-02 10:28:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590518,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:28:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590518,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:28:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590518,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:28:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590518,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:28:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590518', 'tblTempUsageDetail_20' ) start [2025-03-02 10:28:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590518', 'tblTempUsageDetail_20' ) end [2025-03-02 10:28:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:28:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:28:22] Production.INFO: ==2766== Releasing lock... [2025-03-02 10:28:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:28:22] Production.INFO: 30 MB #Memory Used# [2025-03-02 10:29:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:29:05 [end_date_ymd] => 2025-03-02 10:29:05 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:29:05' and `end` < '2025-03-02 10: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-03-02 10:29:17] Production.INFO: count ==254 [2025-03-02 10:29:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:29:05 - End Time 2025-03-02 10:29:05 [2025-03-02 10:29:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590523', 'tblTempUsageDetail_20' ) start [2025-03-02 10:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590523', 'tblTempUsageDetail_20' ) end [2025-03-02 10:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590523', 'tblTempVendorCDR_20' ) start [2025-03-02 10:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590523', 'tblTempVendorCDR_20' ) end [2025-03-02 10:29:17] Production.INFO: ProcessCDR(1,14590523,1,1,2) [2025-03-02 10:29:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590523,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:29:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590523,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:29:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590523,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:29:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590523,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:29:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590523', 'tblTempUsageDetail_20' ) start [2025-03-02 10:29:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590523', 'tblTempUsageDetail_20' ) end [2025-03-02 10:29:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:29:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:29:20] Production.INFO: ==2844== Releasing lock... [2025-03-02 10:29:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:29:20] Production.INFO: 30 MB #Memory Used# [2025-03-02 10:30:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:30:06 [end_date_ymd] => 2025-03-02 10:30:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 07:30:06' and `end` < '2025-03-02 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-03-02 10:30:18] Production.INFO: count ==258 [2025-03-02 10:30:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:30:06 - End Time 2025-03-02 10:30:06 [2025-03-02 10:30:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590529', 'tblTempUsageDetail_20' ) start [2025-03-02 10:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590529', 'tblTempUsageDetail_20' ) end [2025-03-02 10:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590529', 'tblTempVendorCDR_20' ) start [2025-03-02 10:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590529', 'tblTempVendorCDR_20' ) end [2025-03-02 10:30:18] Production.INFO: ProcessCDR(1,14590529,1,1,2) [2025-03-02 10:30:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590529,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:30:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590529,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:30:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590529,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:30:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590529,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:30:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590529', 'tblTempUsageDetail_20' ) start [2025-03-02 10:30:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590529', 'tblTempUsageDetail_20' ) end [2025-03-02 10:30:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:30:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:30:22] Production.INFO: ==2929== Releasing lock... [2025-03-02 10:30:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:30:22] Production.INFO: 30 MB #Memory Used# [2025-03-02 10:31:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:31:04 [end_date_ymd] => 2025-03-02 10:31:04 [RateCDR] => 1 ) [2025-03-02 10:31: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-03-02 07:31:04' and `end` < '2025-03-02 10:31: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-03-02 10:31:16] Production.INFO: count ==271 [2025-03-02 10:31:16] Production.ERROR: pbx CDR StartTime 2025-03-02 07:31:04 - End Time 2025-03-02 10:31:04 [2025-03-02 10:31:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590534', 'tblTempUsageDetail_20' ) start [2025-03-02 10:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590534', 'tblTempUsageDetail_20' ) end [2025-03-02 10:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590534', 'tblTempVendorCDR_20' ) start [2025-03-02 10:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590534', 'tblTempVendorCDR_20' ) end [2025-03-02 10:31:16] Production.INFO: ProcessCDR(1,14590534,1,1,2) [2025-03-02 10:31:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590534,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:31:17] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590534,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:31:17] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590534,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:31:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590534,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:31:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590534', 'tblTempUsageDetail_20' ) start [2025-03-02 10:31:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590534', 'tblTempUsageDetail_20' ) end [2025-03-02 10:31:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:31:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:31:20] Production.INFO: ==3027== Releasing lock... [2025-03-02 10:31:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:31:20] Production.INFO: 30 MB #Memory Used# [2025-03-02 10:32:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:32:05 [end_date_ymd] => 2025-03-02 10:32:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 07:32:05' and `end` < '2025-03-02 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-03-02 10:32:17] Production.INFO: count ==272 [2025-03-02 10:32:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:32:05 - End Time 2025-03-02 10:32:05 [2025-03-02 10:32:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590539', 'tblTempUsageDetail_20' ) start [2025-03-02 10:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590539', 'tblTempUsageDetail_20' ) end [2025-03-02 10:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590539', 'tblTempVendorCDR_20' ) start [2025-03-02 10:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590539', 'tblTempVendorCDR_20' ) end [2025-03-02 10:32:17] Production.INFO: ProcessCDR(1,14590539,1,1,2) [2025-03-02 10:32:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590539,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:32:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590539,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:32:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590539,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:32:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590539,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:32:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590539', 'tblTempUsageDetail_20' ) start [2025-03-02 10:32:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590539', 'tblTempUsageDetail_20' ) end [2025-03-02 10:32:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:32:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:32:22] Production.INFO: ==3128== Releasing lock... [2025-03-02 10:32:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:32:22] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 10:33:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:33:05 [end_date_ymd] => 2025-03-02 10:33:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 07:33:05' and `end` < '2025-03-02 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-03-02 10:33:17] Production.INFO: count ==272 [2025-03-02 10:33:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:33:05 - End Time 2025-03-02 10:33:05 [2025-03-02 10:33:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590544', 'tblTempUsageDetail_20' ) start [2025-03-02 10:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590544', 'tblTempUsageDetail_20' ) end [2025-03-02 10:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590544', 'tblTempVendorCDR_20' ) start [2025-03-02 10:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590544', 'tblTempVendorCDR_20' ) end [2025-03-02 10:33:17] Production.INFO: ProcessCDR(1,14590544,1,1,2) [2025-03-02 10:33:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590544,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:33:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590544,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:33:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590544,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:33:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590544,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:33:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590544', 'tblTempUsageDetail_20' ) start [2025-03-02 10:33:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590544', 'tblTempUsageDetail_20' ) end [2025-03-02 10:33:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:33:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:33:20] Production.INFO: ==3224== Releasing lock... [2025-03-02 10:33:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:33:20] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 10:34:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:34:05 [end_date_ymd] => 2025-03-02 10:34:05 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:34:05' and `end` < '2025-03-02 10: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-03-02 10:34:17] Production.INFO: count ==272 [2025-03-02 10:34:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:34:05 - End Time 2025-03-02 10:34:05 [2025-03-02 10:34:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590549', 'tblTempUsageDetail_20' ) start [2025-03-02 10:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590549', 'tblTempUsageDetail_20' ) end [2025-03-02 10:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590549', 'tblTempVendorCDR_20' ) start [2025-03-02 10:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590549', 'tblTempVendorCDR_20' ) end [2025-03-02 10:34:17] Production.INFO: ProcessCDR(1,14590549,1,1,2) [2025-03-02 10:34:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590549,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:34:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590549,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:34:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590549,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:34:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590549,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:34:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590549', 'tblTempUsageDetail_20' ) start [2025-03-02 10:34:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590549', 'tblTempUsageDetail_20' ) end [2025-03-02 10:34:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:34:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:34:20] Production.INFO: ==3313== Releasing lock... [2025-03-02 10:34:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:34:20] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 10:35:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:35:06 [end_date_ymd] => 2025-03-02 10:35:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 07:35:06' and `end` < '2025-03-02 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-03-02 10:35:18] Production.INFO: count ==275 [2025-03-02 10:35:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:35:06 - End Time 2025-03-02 10:35:06 [2025-03-02 10:35:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590554', 'tblTempUsageDetail_20' ) start [2025-03-02 10:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590554', 'tblTempUsageDetail_20' ) end [2025-03-02 10:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590554', 'tblTempVendorCDR_20' ) start [2025-03-02 10:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590554', 'tblTempVendorCDR_20' ) end [2025-03-02 10:35:18] Production.INFO: ProcessCDR(1,14590554,1,1,2) [2025-03-02 10:35:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590554,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:35:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590554,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:35:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590554,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:35:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590554,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:35:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590554', 'tblTempUsageDetail_20' ) start [2025-03-02 10:35:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590554', 'tblTempUsageDetail_20' ) end [2025-03-02 10:35:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:35:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:35:21] Production.INFO: ==3410== Releasing lock... [2025-03-02 10:35:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:35:21] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 10:36:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:36:05 [end_date_ymd] => 2025-03-02 10:36:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 07:36:05' and `end` < '2025-03-02 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-03-02 10:36:17] Production.INFO: count ==274 [2025-03-02 10:36:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:36:05 - End Time 2025-03-02 10:36:05 [2025-03-02 10:36:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590559', 'tblTempUsageDetail_20' ) start [2025-03-02 10:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590559', 'tblTempUsageDetail_20' ) end [2025-03-02 10:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590559', 'tblTempVendorCDR_20' ) start [2025-03-02 10:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590559', 'tblTempVendorCDR_20' ) end [2025-03-02 10:36:17] Production.INFO: ProcessCDR(1,14590559,1,1,2) [2025-03-02 10:36:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590559,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:36:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590559,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:36:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590559,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:36:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590559,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:36:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590559', 'tblTempUsageDetail_20' ) start [2025-03-02 10:36:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590559', 'tblTempUsageDetail_20' ) end [2025-03-02 10:36:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:36:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:36:20] Production.INFO: ==3491== Releasing lock... [2025-03-02 10:36:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:36:20] Production.INFO: 30 MB #Memory Used# [2025-03-02 10:37:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:37:05 [end_date_ymd] => 2025-03-02 10:37:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 07:37:05' and `end` < '2025-03-02 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-03-02 10:37:17] Production.INFO: count ==276 [2025-03-02 10:37:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:37:05 - End Time 2025-03-02 10:37:05 [2025-03-02 10:37:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590564', 'tblTempUsageDetail_20' ) start [2025-03-02 10:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590564', 'tblTempUsageDetail_20' ) end [2025-03-02 10:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590564', 'tblTempVendorCDR_20' ) start [2025-03-02 10:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590564', 'tblTempVendorCDR_20' ) end [2025-03-02 10:37:17] Production.INFO: ProcessCDR(1,14590564,1,1,2) [2025-03-02 10:37:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590564,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:37:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590564,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:37:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590564,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:37:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590564,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:37:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590564', 'tblTempUsageDetail_20' ) start [2025-03-02 10:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590564', 'tblTempUsageDetail_20' ) end [2025-03-02 10:37:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:37:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:37:21] Production.INFO: ==3585== Releasing lock... [2025-03-02 10:37:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:37:21] Production.INFO: 29.75 MB #Memory Used# [2025-03-02 10:38:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:38:05 [end_date_ymd] => 2025-03-02 10:38:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 07:38:05' and `end` < '2025-03-02 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-03-02 10:38:17] Production.INFO: count ==278 [2025-03-02 10:38:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:38:05 - End Time 2025-03-02 10:38:05 [2025-03-02 10:38:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590569', 'tblTempUsageDetail_20' ) start [2025-03-02 10:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590569', 'tblTempUsageDetail_20' ) end [2025-03-02 10:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590569', 'tblTempVendorCDR_20' ) start [2025-03-02 10:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590569', 'tblTempVendorCDR_20' ) end [2025-03-02 10:38:17] Production.INFO: ProcessCDR(1,14590569,1,1,2) [2025-03-02 10:38:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590569,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:38:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590569,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:38:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590569,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:38:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590569,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:38:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590569', 'tblTempUsageDetail_20' ) start [2025-03-02 10:38:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590569', 'tblTempUsageDetail_20' ) end [2025-03-02 10:38:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:38:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:38:20] Production.INFO: ==3681== Releasing lock... [2025-03-02 10:38:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:38:20] Production.INFO: 30.25 MB #Memory Used# [2025-03-02 10:39:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:39:05 [end_date_ymd] => 2025-03-02 10:39:05 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:39:05' and `end` < '2025-03-02 10: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-03-02 10:39:17] Production.INFO: count ==280 [2025-03-02 10:39:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:39:05 - End Time 2025-03-02 10:39:05 [2025-03-02 10:39:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590574', 'tblTempUsageDetail_20' ) start [2025-03-02 10:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590574', 'tblTempUsageDetail_20' ) end [2025-03-02 10:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590574', 'tblTempVendorCDR_20' ) start [2025-03-02 10:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590574', 'tblTempVendorCDR_20' ) end [2025-03-02 10:39:18] Production.INFO: ProcessCDR(1,14590574,1,1,2) [2025-03-02 10:39:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590574,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:39:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590574,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:39:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590574,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:39:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590574,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:39:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590574', 'tblTempUsageDetail_20' ) start [2025-03-02 10:39:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590574', 'tblTempUsageDetail_20' ) end [2025-03-02 10:39:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:39:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:39:21] Production.INFO: ==3769== Releasing lock... [2025-03-02 10:39:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:39:21] Production.INFO: 30 MB #Memory Used# [2025-03-02 10:40:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:40:06 [end_date_ymd] => 2025-03-02 10:40:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 07:40:06' and `end` < '2025-03-02 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-03-02 10:40:18] Production.INFO: count ==279 [2025-03-02 10:40:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:40:06 - End Time 2025-03-02 10:40:06 [2025-03-02 10:40:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590580', 'tblTempUsageDetail_20' ) start [2025-03-02 10:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590580', 'tblTempUsageDetail_20' ) end [2025-03-02 10:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590580', 'tblTempVendorCDR_20' ) start [2025-03-02 10:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590580', 'tblTempVendorCDR_20' ) end [2025-03-02 10:40:18] Production.INFO: ProcessCDR(1,14590580,1,1,2) [2025-03-02 10:40:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590580,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:40:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590580,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:40:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590580,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:40:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590580,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:40:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590580', 'tblTempUsageDetail_20' ) start [2025-03-02 10:40:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590580', 'tblTempUsageDetail_20' ) end [2025-03-02 10:40:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:40:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:40:21] Production.INFO: ==3862== Releasing lock... [2025-03-02 10:40:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:40:21] Production.INFO: 30.25 MB #Memory Used# [2025-03-02 10:41:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:41:06 [end_date_ymd] => 2025-03-02 10:41:06 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:41:06' and `end` < '2025-03-02 10: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-03-02 10:41:18] Production.INFO: count ==277 [2025-03-02 10:41:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:41:06 - End Time 2025-03-02 10:41:06 [2025-03-02 10:41:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590585', 'tblTempUsageDetail_20' ) start [2025-03-02 10:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590585', 'tblTempUsageDetail_20' ) end [2025-03-02 10:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590585', 'tblTempVendorCDR_20' ) start [2025-03-02 10:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590585', 'tblTempVendorCDR_20' ) end [2025-03-02 10:41:18] Production.INFO: ProcessCDR(1,14590585,1,1,2) [2025-03-02 10:41:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590585,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:41:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590585,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:41:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590585,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:41:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590585,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:41:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590585', 'tblTempUsageDetail_20' ) start [2025-03-02 10:41:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590585', 'tblTempUsageDetail_20' ) end [2025-03-02 10:41:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:41:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:41:21] Production.INFO: ==3950== Releasing lock... [2025-03-02 10:41:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:41:21] Production.INFO: 30.25 MB #Memory Used# [2025-03-02 10:42:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:42:05 [end_date_ymd] => 2025-03-02 10:42:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 07:42:05' and `end` < '2025-03-02 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-03-02 10:42:16] Production.INFO: count ==279 [2025-03-02 10:42:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:42:05 - End Time 2025-03-02 10:42:05 [2025-03-02 10:42:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590590', 'tblTempUsageDetail_20' ) start [2025-03-02 10:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590590', 'tblTempUsageDetail_20' ) end [2025-03-02 10:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590590', 'tblTempVendorCDR_20' ) start [2025-03-02 10:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590590', 'tblTempVendorCDR_20' ) end [2025-03-02 10:42:17] Production.INFO: ProcessCDR(1,14590590,1,1,2) [2025-03-02 10:42:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590590,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:42:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590590,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:42:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590590,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:42:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590590,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:42:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590590', 'tblTempUsageDetail_20' ) start [2025-03-02 10:42:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590590', 'tblTempUsageDetail_20' ) end [2025-03-02 10:42:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:42:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:42:21] Production.INFO: ==4086== Releasing lock... [2025-03-02 10:42:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:42:21] Production.INFO: 30 MB #Memory Used# [2025-03-02 10:43:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:43:06 [end_date_ymd] => 2025-03-02 10:43:06 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:43:06' and `end` < '2025-03-02 10: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-03-02 10:43:18] Production.INFO: count ==279 [2025-03-02 10:43:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:43:06 - End Time 2025-03-02 10:43:06 [2025-03-02 10:43:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590595', 'tblTempUsageDetail_20' ) start [2025-03-02 10:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590595', 'tblTempUsageDetail_20' ) end [2025-03-02 10:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590595', 'tblTempVendorCDR_20' ) start [2025-03-02 10:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590595', 'tblTempVendorCDR_20' ) end [2025-03-02 10:43:18] Production.INFO: ProcessCDR(1,14590595,1,1,2) [2025-03-02 10:43:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590595,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:43:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590595,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:43:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590595,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:43:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590595,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:43:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590595', 'tblTempUsageDetail_20' ) start [2025-03-02 10:43:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590595', 'tblTempUsageDetail_20' ) end [2025-03-02 10:43:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:43:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:43:21] Production.INFO: ==4171== Releasing lock... [2025-03-02 10:43:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:43:21] Production.INFO: 30 MB #Memory Used# [2025-03-02 10:44:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:44:05 [end_date_ymd] => 2025-03-02 10:44:05 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:44:05' and `end` < '2025-03-02 10: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-03-02 10:44:17] Production.INFO: count ==280 [2025-03-02 10:44:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:44:05 - End Time 2025-03-02 10:44:05 [2025-03-02 10:44:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590600', 'tblTempUsageDetail_20' ) start [2025-03-02 10:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590600', 'tblTempUsageDetail_20' ) end [2025-03-02 10:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590600', 'tblTempVendorCDR_20' ) start [2025-03-02 10:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590600', 'tblTempVendorCDR_20' ) end [2025-03-02 10:44:17] Production.INFO: ProcessCDR(1,14590600,1,1,2) [2025-03-02 10:44:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590600,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:44:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590600,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:44:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590600,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:44:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590600,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:44:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590600', 'tblTempUsageDetail_20' ) start [2025-03-02 10:44:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590600', 'tblTempUsageDetail_20' ) end [2025-03-02 10:44:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:44:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:44:20] Production.INFO: ==4255== Releasing lock... [2025-03-02 10:44:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:44:20] Production.INFO: 30.25 MB #Memory Used# [2025-03-02 10:45:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:45:05 [end_date_ymd] => 2025-03-02 10:45:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 07:45:05' and `end` < '2025-03-02 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-03-02 10:45:17] Production.INFO: count ==280 [2025-03-02 10:45:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:45:05 - End Time 2025-03-02 10:45:05 [2025-03-02 10:45:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590605', 'tblTempUsageDetail_20' ) start [2025-03-02 10:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590605', 'tblTempUsageDetail_20' ) end [2025-03-02 10:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590605', 'tblTempVendorCDR_20' ) start [2025-03-02 10:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590605', 'tblTempVendorCDR_20' ) end [2025-03-02 10:45:17] Production.INFO: ProcessCDR(1,14590605,1,1,2) [2025-03-02 10:45:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590605,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:45:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590605,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:45:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590605,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:45:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590605,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:45:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590605', 'tblTempUsageDetail_20' ) start [2025-03-02 10:45:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590605', 'tblTempUsageDetail_20' ) end [2025-03-02 10:45:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:45:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:45:20] Production.INFO: ==4344== Releasing lock... [2025-03-02 10:45:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:45:20] Production.INFO: 30.25 MB #Memory Used# [2025-03-02 10:46:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:46:04 [end_date_ymd] => 2025-03-02 10:46:04 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:46:04' and `end` < '2025-03-02 10: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-03-02 10:46:16] Production.INFO: count ==282 [2025-03-02 10:46:16] Production.ERROR: pbx CDR StartTime 2025-03-02 07:46:04 - End Time 2025-03-02 10:46:04 [2025-03-02 10:46:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:46:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590610', 'tblTempUsageDetail_20' ) start [2025-03-02 10:46:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590610', 'tblTempUsageDetail_20' ) end [2025-03-02 10:46:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590610', 'tblTempVendorCDR_20' ) start [2025-03-02 10:46:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590610', 'tblTempVendorCDR_20' ) end [2025-03-02 10:46:16] Production.INFO: ProcessCDR(1,14590610,1,1,2) [2025-03-02 10:46:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590610,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:46:17] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590610,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:46:17] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590610,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:46:19] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590610,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:46:19] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590610', 'tblTempUsageDetail_20' ) start [2025-03-02 10:46:19] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590610', 'tblTempUsageDetail_20' ) end [2025-03-02 10:46:19] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:46:19] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:46:19] Production.INFO: ==4432== Releasing lock... [2025-03-02 10:46:19] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:46:19] Production.INFO: 30.25 MB #Memory Used# [2025-03-02 10:47:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:47:05 [end_date_ymd] => 2025-03-02 10:47:05 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:47:05' and `end` < '2025-03-02 10: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-03-02 10:47:17] Production.INFO: count ==284 [2025-03-02 10:47:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:47:05 - End Time 2025-03-02 10:47:05 [2025-03-02 10:47:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590615', 'tblTempUsageDetail_20' ) start [2025-03-02 10:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590615', 'tblTempUsageDetail_20' ) end [2025-03-02 10:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590615', 'tblTempVendorCDR_20' ) start [2025-03-02 10:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590615', 'tblTempVendorCDR_20' ) end [2025-03-02 10:47:18] Production.INFO: ProcessCDR(1,14590615,1,1,2) [2025-03-02 10:47:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590615,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:47:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590615,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:47:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590615,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:47:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590615,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:47:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590615', 'tblTempUsageDetail_20' ) start [2025-03-02 10:47:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590615', 'tblTempUsageDetail_20' ) end [2025-03-02 10:47:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:47:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:47:21] Production.INFO: ==4518== Releasing lock... [2025-03-02 10:47:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:47:21] Production.INFO: 30 MB #Memory Used# [2025-03-02 10:48:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:48:05 [end_date_ymd] => 2025-03-02 10:48:05 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:48:05' and `end` < '2025-03-02 10: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-03-02 10:48:17] Production.INFO: count ==297 [2025-03-02 10:48:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:48:05 - End Time 2025-03-02 10:48:05 [2025-03-02 10:48:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590620', 'tblTempUsageDetail_20' ) start [2025-03-02 10:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590620', 'tblTempUsageDetail_20' ) end [2025-03-02 10:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590620', 'tblTempVendorCDR_20' ) start [2025-03-02 10:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590620', 'tblTempVendorCDR_20' ) end [2025-03-02 10:48:17] Production.INFO: ProcessCDR(1,14590620,1,1,2) [2025-03-02 10:48:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590620,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:48:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590620,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:48:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590620,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:48:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590620,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:48:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590620', 'tblTempUsageDetail_20' ) start [2025-03-02 10:48:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590620', 'tblTempUsageDetail_20' ) end [2025-03-02 10:48:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:48:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:48:20] Production.INFO: ==4622== Releasing lock... [2025-03-02 10:48:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:48:20] Production.INFO: 30 MB #Memory Used# [2025-03-02 10:49:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:49:06 [end_date_ymd] => 2025-03-02 10:49:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 07:49:06' and `end` < '2025-03-02 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-03-02 10:49:18] Production.INFO: count ==297 [2025-03-02 10:49:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:49:06 - End Time 2025-03-02 10:49:06 [2025-03-02 10:49:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590625', 'tblTempUsageDetail_20' ) start [2025-03-02 10:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590625', 'tblTempUsageDetail_20' ) end [2025-03-02 10:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590625', 'tblTempVendorCDR_20' ) start [2025-03-02 10:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590625', 'tblTempVendorCDR_20' ) end [2025-03-02 10:49:18] Production.INFO: ProcessCDR(1,14590625,1,1,2) [2025-03-02 10:49:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590625,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:49:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590625,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:49:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590625,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:49:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590625,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:49:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590625', 'tblTempUsageDetail_20' ) start [2025-03-02 10:49:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590625', 'tblTempUsageDetail_20' ) end [2025-03-02 10:49:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:49:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:49:21] Production.INFO: ==4710== Releasing lock... [2025-03-02 10:49:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:49:21] Production.INFO: 30 MB #Memory Used# [2025-03-02 10:50:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:50:06 [end_date_ymd] => 2025-03-02 10:50:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 07:50:06' and `end` < '2025-03-02 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-03-02 10:50:18] Production.INFO: count ==313 [2025-03-02 10:50:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:50:06 - End Time 2025-03-02 10:50:06 [2025-03-02 10:50:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590630', 'tblTempUsageDetail_20' ) start [2025-03-02 10:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590630', 'tblTempUsageDetail_20' ) end [2025-03-02 10:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590630', 'tblTempVendorCDR_20' ) start [2025-03-02 10:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590630', 'tblTempVendorCDR_20' ) end [2025-03-02 10:50:18] Production.INFO: ProcessCDR(1,14590630,1,1,2) [2025-03-02 10:50:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590630,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:50:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590630,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:50:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590630,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:50:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590630,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:50:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590630', 'tblTempUsageDetail_20' ) start [2025-03-02 10:50:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590630', 'tblTempUsageDetail_20' ) end [2025-03-02 10:50:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:50:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:50:22] Production.INFO: ==4803== Releasing lock... [2025-03-02 10:50:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:50:22] Production.INFO: 30.5 MB #Memory Used# [2025-03-02 10:51:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:51:05 [end_date_ymd] => 2025-03-02 10:51:05 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:51:05' and `end` < '2025-03-02 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-03-02 10:51:17] Production.INFO: count ==319 [2025-03-02 10:51:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:51:05 - End Time 2025-03-02 10:51:05 [2025-03-02 10:51:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590636', 'tblTempUsageDetail_20' ) start [2025-03-02 10:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590636', 'tblTempUsageDetail_20' ) end [2025-03-02 10:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590636', 'tblTempVendorCDR_20' ) start [2025-03-02 10:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590636', 'tblTempVendorCDR_20' ) end [2025-03-02 10:51:17] Production.INFO: ProcessCDR(1,14590636,1,1,2) [2025-03-02 10:51:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590636,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:51:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590636,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:51:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590636,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:51:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590636,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:51:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590636', 'tblTempUsageDetail_20' ) start [2025-03-02 10:51:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590636', 'tblTempUsageDetail_20' ) end [2025-03-02 10:51:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:51:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:51:20] Production.INFO: ==4903== Releasing lock... [2025-03-02 10:51:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:51:20] Production.INFO: 30.25 MB #Memory Used# [2025-03-02 10:52:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:52:06 [end_date_ymd] => 2025-03-02 10:52:06 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:52:06' and `end` < '2025-03-02 10: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-03-02 10:52:18] Production.INFO: count ==319 [2025-03-02 10:52:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:52:06 - End Time 2025-03-02 10:52:06 [2025-03-02 10:52:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590641', 'tblTempUsageDetail_20' ) start [2025-03-02 10:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590641', 'tblTempUsageDetail_20' ) end [2025-03-02 10:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590641', 'tblTempVendorCDR_20' ) start [2025-03-02 10:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590641', 'tblTempVendorCDR_20' ) end [2025-03-02 10:52:18] Production.INFO: ProcessCDR(1,14590641,1,1,2) [2025-03-02 10:52:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590641,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:52:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590641,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:52:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590641,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:52:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590641,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:52:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590641', 'tblTempUsageDetail_20' ) start [2025-03-02 10:52:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590641', 'tblTempUsageDetail_20' ) end [2025-03-02 10:52:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:52:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:52:21] Production.INFO: ==4999== Releasing lock... [2025-03-02 10:52:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:52:21] Production.INFO: 30.25 MB #Memory Used# [2025-03-02 10:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:53:05 [end_date_ymd] => 2025-03-02 10:53:05 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:53:05' and `end` < '2025-03-02 10: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-03-02 10:53:17] Production.INFO: count ==320 [2025-03-02 10:53:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:53:05 - End Time 2025-03-02 10:53:05 [2025-03-02 10:53:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590646', 'tblTempUsageDetail_20' ) start [2025-03-02 10:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590646', 'tblTempUsageDetail_20' ) end [2025-03-02 10:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590646', 'tblTempVendorCDR_20' ) start [2025-03-02 10:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590646', 'tblTempVendorCDR_20' ) end [2025-03-02 10:53:17] Production.INFO: ProcessCDR(1,14590646,1,1,2) [2025-03-02 10:53:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590646,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:53:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590646,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:53:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590646,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:53:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590646,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:53:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590646', 'tblTempUsageDetail_20' ) start [2025-03-02 10:53:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590646', 'tblTempUsageDetail_20' ) end [2025-03-02 10:53:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:53:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:53:22] Production.INFO: ==5079== Releasing lock... [2025-03-02 10:53:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:53:22] Production.INFO: 30.5 MB #Memory Used# [2025-03-02 10:54:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:54:06 [end_date_ymd] => 2025-03-02 10:54:06 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:54:06' and `end` < '2025-03-02 10: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-03-02 10:54:18] Production.INFO: count ==323 [2025-03-02 10:54:18] Production.ERROR: pbx CDR StartTime 2025-03-02 07:54:06 - End Time 2025-03-02 10:54:06 [2025-03-02 10:54:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590651', 'tblTempUsageDetail_20' ) start [2025-03-02 10:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590651', 'tblTempUsageDetail_20' ) end [2025-03-02 10:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590651', 'tblTempVendorCDR_20' ) start [2025-03-02 10:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590651', 'tblTempVendorCDR_20' ) end [2025-03-02 10:54:18] Production.INFO: ProcessCDR(1,14590651,1,1,2) [2025-03-02 10:54:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590651,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:54:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590651,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:54:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590651,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:54:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590651,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:54:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590651', 'tblTempUsageDetail_20' ) start [2025-03-02 10:54:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590651', 'tblTempUsageDetail_20' ) end [2025-03-02 10:54:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:54:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:54:21] Production.INFO: ==5165== Releasing lock... [2025-03-02 10:54:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:54:21] Production.INFO: 30.75 MB #Memory Used# [2025-03-02 10:55:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:55:05 [end_date_ymd] => 2025-03-02 10:55:05 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:55:05' and `end` < '2025-03-02 10: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-03-02 10:55:17] Production.INFO: count ==324 [2025-03-02 10:55:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:55:05 - End Time 2025-03-02 10:55:05 [2025-03-02 10:55:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590656', 'tblTempUsageDetail_20' ) start [2025-03-02 10:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590656', 'tblTempUsageDetail_20' ) end [2025-03-02 10:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590656', 'tblTempVendorCDR_20' ) start [2025-03-02 10:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590656', 'tblTempVendorCDR_20' ) end [2025-03-02 10:55:17] Production.INFO: ProcessCDR(1,14590656,1,1,2) [2025-03-02 10:55:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590656,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:55:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590656,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:55:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590656,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:55:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590656,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:55:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590656', 'tblTempUsageDetail_20' ) start [2025-03-02 10:55:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590656', 'tblTempUsageDetail_20' ) end [2025-03-02 10:55:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:55:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:55:20] Production.INFO: ==5246== Releasing lock... [2025-03-02 10:55:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:55:20] Production.INFO: 30.75 MB #Memory Used# [2025-03-02 10:56:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:56:05 [end_date_ymd] => 2025-03-02 10:56:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 07:56:05' and `end` < '2025-03-02 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-03-02 10:56:17] Production.INFO: count ==326 [2025-03-02 10:56:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:56:05 - End Time 2025-03-02 10:56:05 [2025-03-02 10:56:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590661', 'tblTempUsageDetail_20' ) start [2025-03-02 10:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590661', 'tblTempUsageDetail_20' ) end [2025-03-02 10:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590661', 'tblTempVendorCDR_20' ) start [2025-03-02 10:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590661', 'tblTempVendorCDR_20' ) end [2025-03-02 10:56:17] Production.INFO: ProcessCDR(1,14590661,1,1,2) [2025-03-02 10:56:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590661,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:56:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590661,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:56:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590661,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:56:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590661,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:56:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590661', 'tblTempUsageDetail_20' ) start [2025-03-02 10:56:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590661', 'tblTempUsageDetail_20' ) end [2025-03-02 10:56:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:56:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:56:21] Production.INFO: ==5330== Releasing lock... [2025-03-02 10:56:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:56:21] Production.INFO: 30.75 MB #Memory Used# [2025-03-02 10:57:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:57:05 [end_date_ymd] => 2025-03-02 10:57:05 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:57:05' and `end` < '2025-03-02 10: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-03-02 10:57:17] Production.INFO: count ==326 [2025-03-02 10:57:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:57:05 - End Time 2025-03-02 10:57:05 [2025-03-02 10:57:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590666', 'tblTempUsageDetail_20' ) start [2025-03-02 10:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590666', 'tblTempUsageDetail_20' ) end [2025-03-02 10:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590666', 'tblTempVendorCDR_20' ) start [2025-03-02 10:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590666', 'tblTempVendorCDR_20' ) end [2025-03-02 10:57:17] Production.INFO: ProcessCDR(1,14590666,1,1,2) [2025-03-02 10:57:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590666,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:57:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590666,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:57:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590666,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:57:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590666,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:57:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590666', 'tblTempUsageDetail_20' ) start [2025-03-02 10:57:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590666', 'tblTempUsageDetail_20' ) end [2025-03-02 10:57:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:57:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:57:20] Production.INFO: ==5425== Releasing lock... [2025-03-02 10:57:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:57:20] Production.INFO: 30.75 MB #Memory Used# [2025-03-02 10:58:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:58:05 [end_date_ymd] => 2025-03-02 10:58:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 07:58:05' and `end` < '2025-03-02 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-03-02 10:58:17] Production.INFO: count ==326 [2025-03-02 10:58:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:58:05 - End Time 2025-03-02 10:58:05 [2025-03-02 10:58:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590671', 'tblTempUsageDetail_20' ) start [2025-03-02 10:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590671', 'tblTempUsageDetail_20' ) end [2025-03-02 10:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590671', 'tblTempVendorCDR_20' ) start [2025-03-02 10:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590671', 'tblTempVendorCDR_20' ) end [2025-03-02 10:58:17] Production.INFO: ProcessCDR(1,14590671,1,1,2) [2025-03-02 10:58:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590671,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:58:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590671,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:58:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590671,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:58:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590671,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:58:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590671', 'tblTempUsageDetail_20' ) start [2025-03-02 10:58:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590671', 'tblTempUsageDetail_20' ) end [2025-03-02 10:58:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:58:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:58:21] Production.INFO: ==5544== Releasing lock... [2025-03-02 10:58:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:58:21] Production.INFO: 30.75 MB #Memory Used# [2025-03-02 10:59:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 07:59:05 [end_date_ymd] => 2025-03-02 10:59:05 [RateCDR] => 1 ) [2025-03-02 10: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-03-02 07:59:05' and `end` < '2025-03-02 10: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-03-02 10:59:17] Production.INFO: count ==330 [2025-03-02 10:59:17] Production.ERROR: pbx CDR StartTime 2025-03-02 07:59:05 - End Time 2025-03-02 10:59:05 [2025-03-02 10:59:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 10:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590676', 'tblTempUsageDetail_20' ) start [2025-03-02 10:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590676', 'tblTempUsageDetail_20' ) end [2025-03-02 10:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590676', 'tblTempVendorCDR_20' ) start [2025-03-02 10:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590676', 'tblTempVendorCDR_20' ) end [2025-03-02 10:59:17] Production.INFO: ProcessCDR(1,14590676,1,1,2) [2025-03-02 10:59:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590676,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:59:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590676,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 10:59:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590676,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:59:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590676,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 10:59:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590676', 'tblTempUsageDetail_20' ) start [2025-03-02 10:59:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590676', 'tblTempUsageDetail_20' ) end [2025-03-02 10:59:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 10:59:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 10:59:20] Production.INFO: ==5620== Releasing lock... [2025-03-02 10:59:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 10:59:20] Production.INFO: 30.5 MB #Memory Used# [2025-03-02 11:00:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:00:06 [end_date_ymd] => 2025-03-02 11:00:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 08:00:06' and `end` < '2025-03-02 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-03-02 11:00:18] Production.INFO: count ==330 [2025-03-02 11:00:18] Production.ERROR: pbx CDR StartTime 2025-03-02 08:00:06 - End Time 2025-03-02 11:00:06 [2025-03-02 11:00:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590682', 'tblTempUsageDetail_20' ) start [2025-03-02 11:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590682', 'tblTempUsageDetail_20' ) end [2025-03-02 11:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590682', 'tblTempVendorCDR_20' ) start [2025-03-02 11:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590682', 'tblTempVendorCDR_20' ) end [2025-03-02 11:00:18] Production.INFO: ProcessCDR(1,14590682,1,1,2) [2025-03-02 11:00:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590682,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:00:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590682,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:00:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590682,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:00:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590682,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:00:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590682', 'tblTempUsageDetail_20' ) start [2025-03-02 11:00:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590682', 'tblTempUsageDetail_20' ) end [2025-03-02 11:00:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:00:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:00:22] Production.INFO: ==5713== Releasing lock... [2025-03-02 11:00:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:00:22] Production.INFO: 30.5 MB #Memory Used# [2025-03-02 11:01:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:01:05 [end_date_ymd] => 2025-03-02 11:01:05 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:01:05' and `end` < '2025-03-02 11: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-03-02 11:01:17] Production.INFO: count ==326 [2025-03-02 11:01:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:01:05 - End Time 2025-03-02 11:01:05 [2025-03-02 11:01:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590687', 'tblTempUsageDetail_20' ) start [2025-03-02 11:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590687', 'tblTempUsageDetail_20' ) end [2025-03-02 11:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590687', 'tblTempVendorCDR_20' ) start [2025-03-02 11:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590687', 'tblTempVendorCDR_20' ) end [2025-03-02 11:01:17] Production.INFO: ProcessCDR(1,14590687,1,1,2) [2025-03-02 11:01:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590687,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:01:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590687,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:01:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590687,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:01:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590687,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:01:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590687', 'tblTempUsageDetail_20' ) start [2025-03-02 11:01:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590687', 'tblTempUsageDetail_20' ) end [2025-03-02 11:01:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:01:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:01:20] Production.INFO: ==5852== Releasing lock... [2025-03-02 11:01:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:01:20] Production.INFO: 30.75 MB #Memory Used# [2025-03-02 11:02:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:02:06 [end_date_ymd] => 2025-03-02 11:02:06 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:02:06' and `end` < '2025-03-02 11: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-03-02 11:02:18] Production.INFO: count ==326 [2025-03-02 11:02:18] Production.ERROR: pbx CDR StartTime 2025-03-02 08:02:06 - End Time 2025-03-02 11:02:06 [2025-03-02 11:02:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590692', 'tblTempUsageDetail_20' ) start [2025-03-02 11:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590692', 'tblTempUsageDetail_20' ) end [2025-03-02 11:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590692', 'tblTempVendorCDR_20' ) start [2025-03-02 11:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590692', 'tblTempVendorCDR_20' ) end [2025-03-02 11:02:18] Production.INFO: ProcessCDR(1,14590692,1,1,2) [2025-03-02 11:02:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590692,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:02:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590692,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:02:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590692,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:02:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590692,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:02:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590692', 'tblTempUsageDetail_20' ) start [2025-03-02 11:02:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590692', 'tblTempUsageDetail_20' ) end [2025-03-02 11:02:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:02:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:02:21] Production.INFO: ==5993== Releasing lock... [2025-03-02 11:02:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:02:21] Production.INFO: 30.75 MB #Memory Used# [2025-03-02 11:03:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:03:05 [end_date_ymd] => 2025-03-02 11:03:05 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:03:05' and `end` < '2025-03-02 11: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-03-02 11:03:17] Production.INFO: count ==326 [2025-03-02 11:03:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:03:05 - End Time 2025-03-02 11:03:05 [2025-03-02 11:03:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590697', 'tblTempUsageDetail_20' ) start [2025-03-02 11:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590697', 'tblTempUsageDetail_20' ) end [2025-03-02 11:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590697', 'tblTempVendorCDR_20' ) start [2025-03-02 11:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590697', 'tblTempVendorCDR_20' ) end [2025-03-02 11:03:17] Production.INFO: ProcessCDR(1,14590697,1,1,2) [2025-03-02 11:03:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590697,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:03:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590697,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:03:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590697,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:03:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590697,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:03:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590697', 'tblTempUsageDetail_20' ) start [2025-03-02 11:03:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590697', 'tblTempUsageDetail_20' ) end [2025-03-02 11:03:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:03:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:03:21] Production.INFO: ==6086== Releasing lock... [2025-03-02 11:03:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:03:21] Production.INFO: 30.75 MB #Memory Used# [2025-03-02 11:04:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:04:05 [end_date_ymd] => 2025-03-02 11:04:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 08:04:05' and `end` < '2025-03-02 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-03-02 11:04:17] Production.INFO: count ==327 [2025-03-02 11:04:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:04:05 - End Time 2025-03-02 11:04:05 [2025-03-02 11:04:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590702', 'tblTempUsageDetail_20' ) start [2025-03-02 11:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590702', 'tblTempUsageDetail_20' ) end [2025-03-02 11:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590702', 'tblTempVendorCDR_20' ) start [2025-03-02 11:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590702', 'tblTempVendorCDR_20' ) end [2025-03-02 11:04:17] Production.INFO: ProcessCDR(1,14590702,1,1,2) [2025-03-02 11:04:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590702,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:04:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590702,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:04:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590702,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:04:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590702,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:04:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590702', 'tblTempUsageDetail_20' ) start [2025-03-02 11:04:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590702', 'tblTempUsageDetail_20' ) end [2025-03-02 11:04:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:04:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:04:21] Production.INFO: ==6180== Releasing lock... [2025-03-02 11:04:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:04:21] Production.INFO: 30.75 MB #Memory Used# [2025-03-02 11:05:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:05:05 [end_date_ymd] => 2025-03-02 11:05:05 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:05:05' and `end` < '2025-03-02 11: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-03-02 11:05:17] Production.INFO: count ==330 [2025-03-02 11:05:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:05:05 - End Time 2025-03-02 11:05:05 [2025-03-02 11:05:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590707', 'tblTempUsageDetail_20' ) start [2025-03-02 11:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590707', 'tblTempUsageDetail_20' ) end [2025-03-02 11:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590707', 'tblTempVendorCDR_20' ) start [2025-03-02 11:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590707', 'tblTempVendorCDR_20' ) end [2025-03-02 11:05:17] Production.INFO: ProcessCDR(1,14590707,1,1,2) [2025-03-02 11:05:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590707,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:05:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590707,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:05:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590707,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:05:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590707,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:05:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590707', 'tblTempUsageDetail_20' ) start [2025-03-02 11:05:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590707', 'tblTempUsageDetail_20' ) end [2025-03-02 11:05:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:05:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:05:20] Production.INFO: ==6340== Releasing lock... [2025-03-02 11:05:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:05:20] Production.INFO: 30.5 MB #Memory Used# [2025-03-02 11:06:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:06:05 [end_date_ymd] => 2025-03-02 11:06:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 08:06:05' and `end` < '2025-03-02 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-03-02 11:06:17] Production.INFO: count ==330 [2025-03-02 11:06:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:06:05 - End Time 2025-03-02 11:06:05 [2025-03-02 11:06:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590712', 'tblTempUsageDetail_20' ) start [2025-03-02 11:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590712', 'tblTempUsageDetail_20' ) end [2025-03-02 11:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590712', 'tblTempVendorCDR_20' ) start [2025-03-02 11:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590712', 'tblTempVendorCDR_20' ) end [2025-03-02 11:06:17] Production.INFO: ProcessCDR(1,14590712,1,1,2) [2025-03-02 11:06:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590712,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:06:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590712,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:06:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590712,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:06:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590712,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:06:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590712', 'tblTempUsageDetail_20' ) start [2025-03-02 11:06:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590712', 'tblTempUsageDetail_20' ) end [2025-03-02 11:06:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:06:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:06:20] Production.INFO: ==6426== Releasing lock... [2025-03-02 11:06:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:06:20] Production.INFO: 30.5 MB #Memory Used# [2025-03-02 11:07:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:07:06 [end_date_ymd] => 2025-03-02 11:07:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 08:07:06' and `end` < '2025-03-02 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-03-02 11:07:18] Production.INFO: count ==326 [2025-03-02 11:07:18] Production.ERROR: pbx CDR StartTime 2025-03-02 08:07:06 - End Time 2025-03-02 11:07:06 [2025-03-02 11:07:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590717', 'tblTempUsageDetail_20' ) start [2025-03-02 11:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590717', 'tblTempUsageDetail_20' ) end [2025-03-02 11:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590717', 'tblTempVendorCDR_20' ) start [2025-03-02 11:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590717', 'tblTempVendorCDR_20' ) end [2025-03-02 11:07:18] Production.INFO: ProcessCDR(1,14590717,1,1,2) [2025-03-02 11:07:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590717,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:07:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590717,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:07:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590717,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:07:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590717,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:07:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590717', 'tblTempUsageDetail_20' ) start [2025-03-02 11:07:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590717', 'tblTempUsageDetail_20' ) end [2025-03-02 11:07:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:07:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:07:21] Production.INFO: ==6499== Releasing lock... [2025-03-02 11:07:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:07:21] Production.INFO: 30.75 MB #Memory Used# [2025-03-02 11:08:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:08:05 [end_date_ymd] => 2025-03-02 11:08:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 08:08:05' and `end` < '2025-03-02 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-03-02 11:08:17] Production.INFO: count ==326 [2025-03-02 11:08:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:08:05 - End Time 2025-03-02 11:08:05 [2025-03-02 11:08:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590722', 'tblTempUsageDetail_20' ) start [2025-03-02 11:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590722', 'tblTempUsageDetail_20' ) end [2025-03-02 11:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590722', 'tblTempVendorCDR_20' ) start [2025-03-02 11:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590722', 'tblTempVendorCDR_20' ) end [2025-03-02 11:08:17] Production.INFO: ProcessCDR(1,14590722,1,1,2) [2025-03-02 11:08:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590722,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:08:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590722,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:08:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590722,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:08:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590722,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:08:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590722', 'tblTempUsageDetail_20' ) start [2025-03-02 11:08:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590722', 'tblTempUsageDetail_20' ) end [2025-03-02 11:08:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:08:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:08:20] Production.INFO: ==6667== Releasing lock... [2025-03-02 11:08:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:08:20] Production.INFO: 30.75 MB #Memory Used# [2025-03-02 11:09:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:09:05 [end_date_ymd] => 2025-03-02 11:09:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 08:09:05' and `end` < '2025-03-02 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-03-02 11:09:17] Production.INFO: count ==326 [2025-03-02 11:09:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:09:05 - End Time 2025-03-02 11:09:05 [2025-03-02 11:09:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590727', 'tblTempUsageDetail_20' ) start [2025-03-02 11:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590727', 'tblTempUsageDetail_20' ) end [2025-03-02 11:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590727', 'tblTempVendorCDR_20' ) start [2025-03-02 11:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590727', 'tblTempVendorCDR_20' ) end [2025-03-02 11:09:17] Production.INFO: ProcessCDR(1,14590727,1,1,2) [2025-03-02 11:09:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590727,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:09:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590727,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:09:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590727,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:09:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590727,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:09:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590727', 'tblTempUsageDetail_20' ) start [2025-03-02 11:09:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590727', 'tblTempUsageDetail_20' ) end [2025-03-02 11:09:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:09:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:09:20] Production.INFO: ==6749== Releasing lock... [2025-03-02 11:09:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:09:20] Production.INFO: 31 MB #Memory Used# [2025-03-02 11:10:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:10:05 [end_date_ymd] => 2025-03-02 11:10:05 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:10:05' and `end` < '2025-03-02 11: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-03-02 11:10:17] Production.INFO: count ==327 [2025-03-02 11:10:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:10:05 - End Time 2025-03-02 11:10:05 [2025-03-02 11:10:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590731', 'tblTempUsageDetail_20' ) start [2025-03-02 11:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590731', 'tblTempUsageDetail_20' ) end [2025-03-02 11:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590731', 'tblTempVendorCDR_20' ) start [2025-03-02 11:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590731', 'tblTempVendorCDR_20' ) end [2025-03-02 11:10:17] Production.INFO: ProcessCDR(1,14590731,1,1,2) [2025-03-02 11:10:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590731,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:10:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590731,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:10:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590731,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:10:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590731,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:10:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590731', 'tblTempUsageDetail_20' ) start [2025-03-02 11:10:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590731', 'tblTempUsageDetail_20' ) end [2025-03-02 11:10:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:10:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:10:21] Production.INFO: ==6844== Releasing lock... [2025-03-02 11:10:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:10:21] Production.INFO: 30.75 MB #Memory Used# [2025-03-02 11:11:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:11:06 [end_date_ymd] => 2025-03-02 11:11:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 08:11:06' and `end` < '2025-03-02 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-03-02 11:11:18] Production.INFO: count ==339 [2025-03-02 11:11:18] Production.ERROR: pbx CDR StartTime 2025-03-02 08:11:06 - End Time 2025-03-02 11:11:06 [2025-03-02 11:11:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:11:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590738', 'tblTempUsageDetail_20' ) start [2025-03-02 11:11:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590738', 'tblTempUsageDetail_20' ) end [2025-03-02 11:11:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590738', 'tblTempVendorCDR_20' ) start [2025-03-02 11:11:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590738', 'tblTempVendorCDR_20' ) end [2025-03-02 11:11:18] Production.INFO: ProcessCDR(1,14590738,1,1,2) [2025-03-02 11:11:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590738,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:11:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590738,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:11:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590738,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:11:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590738,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:11:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590738', 'tblTempUsageDetail_20' ) start [2025-03-02 11:11:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590738', 'tblTempUsageDetail_20' ) end [2025-03-02 11:11:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:11:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:11:21] Production.INFO: ==6921== Releasing lock... [2025-03-02 11:11:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:11:21] Production.INFO: 30.5 MB #Memory Used# [2025-03-02 11:12:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:12:05 [end_date_ymd] => 2025-03-02 11:12:05 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:12:05' and `end` < '2025-03-02 11: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-03-02 11:12:17] Production.INFO: count ==340 [2025-03-02 11:12:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:12:05 - End Time 2025-03-02 11:12:05 [2025-03-02 11:12:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590743', 'tblTempUsageDetail_20' ) start [2025-03-02 11:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590743', 'tblTempUsageDetail_20' ) end [2025-03-02 11:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590743', 'tblTempVendorCDR_20' ) start [2025-03-02 11:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590743', 'tblTempVendorCDR_20' ) end [2025-03-02 11:12:17] Production.INFO: ProcessCDR(1,14590743,1,1,2) [2025-03-02 11:12:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590743,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:12:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590743,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:12:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590743,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:12:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590743,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:12:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590743', 'tblTempUsageDetail_20' ) start [2025-03-02 11:12:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590743', 'tblTempUsageDetail_20' ) end [2025-03-02 11:12:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:12:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:12:21] Production.INFO: ==7090== Releasing lock... [2025-03-02 11:12:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:12:21] Production.INFO: 30.75 MB #Memory Used# [2025-03-02 11:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:13:05 [end_date_ymd] => 2025-03-02 11:13:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 08:13:05' and `end` < '2025-03-02 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-03-02 11:13:17] Production.INFO: count ==338 [2025-03-02 11:13:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:13:05 - End Time 2025-03-02 11:13:05 [2025-03-02 11:13:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590748', 'tblTempUsageDetail_20' ) start [2025-03-02 11:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590748', 'tblTempUsageDetail_20' ) end [2025-03-02 11:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590748', 'tblTempVendorCDR_20' ) start [2025-03-02 11:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590748', 'tblTempVendorCDR_20' ) end [2025-03-02 11:13:17] Production.INFO: ProcessCDR(1,14590748,1,1,2) [2025-03-02 11:13:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590748,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:13:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590748,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:13:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590748,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:13:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590748,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:13:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590748', 'tblTempUsageDetail_20' ) start [2025-03-02 11:13:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590748', 'tblTempUsageDetail_20' ) end [2025-03-02 11:13:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:13:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:13:20] Production.INFO: ==7203== Releasing lock... [2025-03-02 11:13:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:13:20] Production.INFO: 30.25 MB #Memory Used# [2025-03-02 11:14:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:14:05 [end_date_ymd] => 2025-03-02 11:14:05 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:14:05' and `end` < '2025-03-02 11: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-03-02 11:14:17] Production.INFO: count ==353 [2025-03-02 11:14:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:14:05 - End Time 2025-03-02 11:14:05 [2025-03-02 11:14:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590753', 'tblTempUsageDetail_20' ) start [2025-03-02 11:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590753', 'tblTempUsageDetail_20' ) end [2025-03-02 11:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590753', 'tblTempVendorCDR_20' ) start [2025-03-02 11:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590753', 'tblTempVendorCDR_20' ) end [2025-03-02 11:14:17] Production.INFO: ProcessCDR(1,14590753,1,1,2) [2025-03-02 11:14:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590753,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:14:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590753,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:14:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590753,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:14:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590753,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:14:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590753', 'tblTempUsageDetail_20' ) start [2025-03-02 11:14:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590753', 'tblTempUsageDetail_20' ) end [2025-03-02 11:14:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:14:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:14:20] Production.INFO: ==7296== Releasing lock... [2025-03-02 11:14:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:14:20] Production.INFO: 30.75 MB #Memory Used# [2025-03-02 11:15:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:15:05 [end_date_ymd] => 2025-03-02 11:15:05 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:15:05' and `end` < '2025-03-02 11: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-03-02 11:15:17] Production.INFO: count ==354 [2025-03-02 11:15:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:15:05 - End Time 2025-03-02 11:15:05 [2025-03-02 11:15:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590758', 'tblTempUsageDetail_20' ) start [2025-03-02 11:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590758', 'tblTempUsageDetail_20' ) end [2025-03-02 11:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590758', 'tblTempVendorCDR_20' ) start [2025-03-02 11:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590758', 'tblTempVendorCDR_20' ) end [2025-03-02 11:15:17] Production.INFO: ProcessCDR(1,14590758,1,1,2) [2025-03-02 11:15:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590758,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:15:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590758,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:15:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590758,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:15:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590758,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:15:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590758', 'tblTempUsageDetail_20' ) start [2025-03-02 11:15:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590758', 'tblTempUsageDetail_20' ) end [2025-03-02 11:15:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:15:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:15:22] Production.INFO: ==7463== Releasing lock... [2025-03-02 11:15:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:15:22] Production.INFO: 30.75 MB #Memory Used# [2025-03-02 11:16:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:16:05 [end_date_ymd] => 2025-03-02 11:16:05 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:16:05' and `end` < '2025-03-02 11: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-03-02 11:16:17] Production.INFO: count ==354 [2025-03-02 11:16:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:16:05 - End Time 2025-03-02 11:16:05 [2025-03-02 11:16:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590763', 'tblTempUsageDetail_20' ) start [2025-03-02 11:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590763', 'tblTempUsageDetail_20' ) end [2025-03-02 11:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590763', 'tblTempVendorCDR_20' ) start [2025-03-02 11:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590763', 'tblTempVendorCDR_20' ) end [2025-03-02 11:16:17] Production.INFO: ProcessCDR(1,14590763,1,1,2) [2025-03-02 11:16:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590763,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:16:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590763,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:16:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590763,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:16:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590763,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590763', 'tblTempUsageDetail_20' ) start [2025-03-02 11:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590763', 'tblTempUsageDetail_20' ) end [2025-03-02 11:16:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:16:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:16:21] Production.INFO: ==7555== Releasing lock... [2025-03-02 11:16:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:16:21] Production.INFO: 30.75 MB #Memory Used# [2025-03-02 11:17:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:17:06 [end_date_ymd] => 2025-03-02 11:17:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 08:17:06' and `end` < '2025-03-02 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-03-02 11:17:18] Production.INFO: count ==354 [2025-03-02 11:17:18] Production.ERROR: pbx CDR StartTime 2025-03-02 08:17:06 - End Time 2025-03-02 11:17:06 [2025-03-02 11:17:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590768', 'tblTempUsageDetail_20' ) start [2025-03-02 11:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590768', 'tblTempUsageDetail_20' ) end [2025-03-02 11:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590768', 'tblTempVendorCDR_20' ) start [2025-03-02 11:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590768', 'tblTempVendorCDR_20' ) end [2025-03-02 11:17:18] Production.INFO: ProcessCDR(1,14590768,1,1,2) [2025-03-02 11:17:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590768,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:17:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590768,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:17:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590768,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:17:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590768,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590768', 'tblTempUsageDetail_20' ) start [2025-03-02 11:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590768', 'tblTempUsageDetail_20' ) end [2025-03-02 11:17:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:17:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:17:21] Production.INFO: ==7648== Releasing lock... [2025-03-02 11:17:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:17:21] Production.INFO: 30.75 MB #Memory Used# [2025-03-02 11:18:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:18:05 [end_date_ymd] => 2025-03-02 11:18:05 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:18:05' and `end` < '2025-03-02 11: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-03-02 11:18:17] Production.INFO: count ==355 [2025-03-02 11:18:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:18:05 - End Time 2025-03-02 11:18:05 [2025-03-02 11:18:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590773', 'tblTempUsageDetail_20' ) start [2025-03-02 11:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590773', 'tblTempUsageDetail_20' ) end [2025-03-02 11:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590773', 'tblTempVendorCDR_20' ) start [2025-03-02 11:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590773', 'tblTempVendorCDR_20' ) end [2025-03-02 11:18:17] Production.INFO: ProcessCDR(1,14590773,1,1,2) [2025-03-02 11:18:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590773,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:18:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590773,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:18:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590773,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:18:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590773,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:18:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590773', 'tblTempUsageDetail_20' ) start [2025-03-02 11:18:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590773', 'tblTempUsageDetail_20' ) end [2025-03-02 11:18:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:18:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:18:20] Production.INFO: ==7728== Releasing lock... [2025-03-02 11:18:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:18:20] Production.INFO: 30.75 MB #Memory Used# [2025-03-02 11:19:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:19:05 [end_date_ymd] => 2025-03-02 11:19:05 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:19:05' and `end` < '2025-03-02 11: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-03-02 11:19:17] Production.INFO: count ==359 [2025-03-02 11:19:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:19:05 - End Time 2025-03-02 11:19:05 [2025-03-02 11:19:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590778', 'tblTempUsageDetail_20' ) start [2025-03-02 11:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590778', 'tblTempUsageDetail_20' ) end [2025-03-02 11:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590778', 'tblTempVendorCDR_20' ) start [2025-03-02 11:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590778', 'tblTempVendorCDR_20' ) end [2025-03-02 11:19:18] Production.INFO: ProcessCDR(1,14590778,1,1,2) [2025-03-02 11:19:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590778,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:19:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590778,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:19:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590778,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:19:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590778,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:19:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590778', 'tblTempUsageDetail_20' ) start [2025-03-02 11:19:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590778', 'tblTempUsageDetail_20' ) end [2025-03-02 11:19:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:19:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:19:23] Production.INFO: ==7809== Releasing lock... [2025-03-02 11:19:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:19:23] Production.INFO: 31 MB #Memory Used# [2025-03-02 11:20:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:20:06 [end_date_ymd] => 2025-03-02 11:20:06 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:20:06' and `end` < '2025-03-02 11: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-03-02 11:20:18] Production.INFO: count ==361 [2025-03-02 11:20:18] Production.ERROR: pbx CDR StartTime 2025-03-02 08:20:06 - End Time 2025-03-02 11:20:06 [2025-03-02 11:20:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590784', 'tblTempUsageDetail_20' ) start [2025-03-02 11:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590784', 'tblTempUsageDetail_20' ) end [2025-03-02 11:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590784', 'tblTempVendorCDR_20' ) start [2025-03-02 11:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590784', 'tblTempVendorCDR_20' ) end [2025-03-02 11:20:18] Production.INFO: ProcessCDR(1,14590784,1,1,2) [2025-03-02 11:20:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590784,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:20:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590784,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:20:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590784,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:20:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590784,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:20:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590784', 'tblTempUsageDetail_20' ) start [2025-03-02 11:20:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590784', 'tblTempUsageDetail_20' ) end [2025-03-02 11:20:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:20:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:20:21] Production.INFO: ==7892== Releasing lock... [2025-03-02 11:20:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:20:21] Production.INFO: 31 MB #Memory Used# [2025-03-02 11:21:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:21:05 [end_date_ymd] => 2025-03-02 11:21:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 08:21:05' and `end` < '2025-03-02 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-03-02 11:21:17] Production.INFO: count ==384 [2025-03-02 11:21:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:21:05 - End Time 2025-03-02 11:21:05 [2025-03-02 11:21:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590789', 'tblTempUsageDetail_20' ) start [2025-03-02 11:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590789', 'tblTempUsageDetail_20' ) end [2025-03-02 11:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590789', 'tblTempVendorCDR_20' ) start [2025-03-02 11:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590789', 'tblTempVendorCDR_20' ) end [2025-03-02 11:21:17] Production.INFO: ProcessCDR(1,14590789,1,1,2) [2025-03-02 11:21:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590789,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:21:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590789,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:21:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590789,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:21:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590789,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:21:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590789', 'tblTempUsageDetail_20' ) start [2025-03-02 11:21:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590789', 'tblTempUsageDetail_20' ) end [2025-03-02 11:21:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:21:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:21:22] Production.INFO: ==7980== Releasing lock... [2025-03-02 11:21:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:21:22] Production.INFO: 31 MB #Memory Used# [2025-03-02 11:22:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:22:06 [end_date_ymd] => 2025-03-02 11:22:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 08:22:06' and `end` < '2025-03-02 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-03-02 11:22:18] Production.INFO: count ==383 [2025-03-02 11:22:18] Production.ERROR: pbx CDR StartTime 2025-03-02 08:22:06 - End Time 2025-03-02 11:22:06 [2025-03-02 11:22:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590794', 'tblTempUsageDetail_20' ) start [2025-03-02 11:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590794', 'tblTempUsageDetail_20' ) end [2025-03-02 11:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590794', 'tblTempVendorCDR_20' ) start [2025-03-02 11:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590794', 'tblTempVendorCDR_20' ) end [2025-03-02 11:22:18] Production.INFO: ProcessCDR(1,14590794,1,1,2) [2025-03-02 11:22:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590794,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:22:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590794,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:22:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590794,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:22:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590794,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590794', 'tblTempUsageDetail_20' ) start [2025-03-02 11:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590794', 'tblTempUsageDetail_20' ) end [2025-03-02 11:22:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:22:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:22:21] Production.INFO: ==8052== Releasing lock... [2025-03-02 11:22:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:22:21] Production.INFO: 31 MB #Memory Used# [2025-03-02 11:23:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:23:05 [end_date_ymd] => 2025-03-02 11:23:05 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:23:05' and `end` < '2025-03-02 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-03-02 11:23:17] Production.INFO: count ==391 [2025-03-02 11:23:18] Production.ERROR: pbx CDR StartTime 2025-03-02 08:23:05 - End Time 2025-03-02 11:23:05 [2025-03-02 11:23:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:23:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590799', 'tblTempUsageDetail_20' ) start [2025-03-02 11:23:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590799', 'tblTempUsageDetail_20' ) end [2025-03-02 11:23:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590799', 'tblTempVendorCDR_20' ) start [2025-03-02 11:23:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590799', 'tblTempVendorCDR_20' ) end [2025-03-02 11:23:18] Production.INFO: ProcessCDR(1,14590799,1,1,2) [2025-03-02 11:23:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590799,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:23:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590799,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:23:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590799,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:23:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590799,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:23:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590799', 'tblTempUsageDetail_20' ) start [2025-03-02 11:23:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590799', 'tblTempUsageDetail_20' ) end [2025-03-02 11:23:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:23:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:23:21] Production.INFO: ==8137== Releasing lock... [2025-03-02 11:23:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:23:21] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 11:24:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:24:05 [end_date_ymd] => 2025-03-02 11:24:05 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:24:05' and `end` < '2025-03-02 11: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-03-02 11:24:17] Production.INFO: count ==393 [2025-03-02 11:24:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:24:05 - End Time 2025-03-02 11:24:05 [2025-03-02 11:24:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590804', 'tblTempUsageDetail_20' ) start [2025-03-02 11:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590804', 'tblTempUsageDetail_20' ) end [2025-03-02 11:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590804', 'tblTempVendorCDR_20' ) start [2025-03-02 11:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590804', 'tblTempVendorCDR_20' ) end [2025-03-02 11:24:17] Production.INFO: ProcessCDR(1,14590804,1,1,2) [2025-03-02 11:24:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590804,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:24:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590804,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:24:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590804,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:24:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590804,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:24:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590804', 'tblTempUsageDetail_20' ) start [2025-03-02 11:24:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590804', 'tblTempUsageDetail_20' ) end [2025-03-02 11:24:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:24:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:24:22] Production.INFO: ==8271== Releasing lock... [2025-03-02 11:24:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:24:22] Production.INFO: 31 MB #Memory Used# [2025-03-02 11:25:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:25:05 [end_date_ymd] => 2025-03-02 11:25:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 08:25:05' and `end` < '2025-03-02 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-03-02 11:25:17] Production.INFO: count ==398 [2025-03-02 11:25:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:25:05 - End Time 2025-03-02 11:25:05 [2025-03-02 11:25:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590809', 'tblTempUsageDetail_20' ) start [2025-03-02 11:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590809', 'tblTempUsageDetail_20' ) end [2025-03-02 11:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590809', 'tblTempVendorCDR_20' ) start [2025-03-02 11:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590809', 'tblTempVendorCDR_20' ) end [2025-03-02 11:25:17] Production.INFO: ProcessCDR(1,14590809,1,1,2) [2025-03-02 11:25:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590809,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:25:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590809,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:25:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590809,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:25:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590809,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:25:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590809', 'tblTempUsageDetail_20' ) start [2025-03-02 11:25:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590809', 'tblTempUsageDetail_20' ) end [2025-03-02 11:25:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:25:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:25:22] Production.INFO: ==8405== Releasing lock... [2025-03-02 11:25:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:25:22] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 11:26:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:26:06 [end_date_ymd] => 2025-03-02 11:26:06 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:26:06' and `end` < '2025-03-02 11: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-03-02 11:26:18] Production.INFO: count ==406 [2025-03-02 11:26:18] Production.ERROR: pbx CDR StartTime 2025-03-02 08:26:06 - End Time 2025-03-02 11:26:06 [2025-03-02 11:26:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590814', 'tblTempUsageDetail_20' ) start [2025-03-02 11:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590814', 'tblTempUsageDetail_20' ) end [2025-03-02 11:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590814', 'tblTempVendorCDR_20' ) start [2025-03-02 11:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590814', 'tblTempVendorCDR_20' ) end [2025-03-02 11:26:18] Production.INFO: ProcessCDR(1,14590814,1,1,2) [2025-03-02 11:26:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590814,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:26:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590814,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:26:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590814,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:26:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590814,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:26:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590814', 'tblTempUsageDetail_20' ) start [2025-03-02 11:26:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590814', 'tblTempUsageDetail_20' ) end [2025-03-02 11:26:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:26:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:26:21] Production.INFO: ==8536== Releasing lock... [2025-03-02 11:26:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:26:21] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 11:27:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:27:06 [end_date_ymd] => 2025-03-02 11:27:06 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:27:06' and `end` < '2025-03-02 11: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-03-02 11:27:18] Production.INFO: count ==409 [2025-03-02 11:27:18] Production.ERROR: pbx CDR StartTime 2025-03-02 08:27:06 - End Time 2025-03-02 11:27:06 [2025-03-02 11:27:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:27:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590819', 'tblTempUsageDetail_20' ) start [2025-03-02 11:27:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590819', 'tblTempUsageDetail_20' ) end [2025-03-02 11:27:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590819', 'tblTempVendorCDR_20' ) start [2025-03-02 11:27:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590819', 'tblTempVendorCDR_20' ) end [2025-03-02 11:27:18] Production.INFO: ProcessCDR(1,14590819,1,1,2) [2025-03-02 11:27:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590819,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:27:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590819,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:27:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590819,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:27:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590819,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:27:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590819', 'tblTempUsageDetail_20' ) start [2025-03-02 11:27:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590819', 'tblTempUsageDetail_20' ) end [2025-03-02 11:27:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:27:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:27:23] Production.INFO: ==8674== Releasing lock... [2025-03-02 11:27:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:27:23] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 11:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:28:05 [end_date_ymd] => 2025-03-02 11:28:05 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:28:05' and `end` < '2025-03-02 11: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-03-02 11:28:17] Production.INFO: count ==410 [2025-03-02 11:28:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:28:05 - End Time 2025-03-02 11:28:05 [2025-03-02 11:28:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590824', 'tblTempUsageDetail_20' ) start [2025-03-02 11:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590824', 'tblTempUsageDetail_20' ) end [2025-03-02 11:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590824', 'tblTempVendorCDR_20' ) start [2025-03-02 11:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590824', 'tblTempVendorCDR_20' ) end [2025-03-02 11:28:17] Production.INFO: ProcessCDR(1,14590824,1,1,2) [2025-03-02 11:28:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590824,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:28:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590824,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:28:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590824,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:28:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590824,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:28:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590824', 'tblTempUsageDetail_20' ) start [2025-03-02 11:28:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590824', 'tblTempUsageDetail_20' ) end [2025-03-02 11:28:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:28:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:28:22] Production.INFO: ==8801== Releasing lock... [2025-03-02 11:28:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:28:22] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 11:29:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:29:05 [end_date_ymd] => 2025-03-02 11:29:05 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:29:05' and `end` < '2025-03-02 11: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-03-02 11:29:17] Production.INFO: count ==407 [2025-03-02 11:29:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:29:05 - End Time 2025-03-02 11:29:05 [2025-03-02 11:29:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590829', 'tblTempUsageDetail_20' ) start [2025-03-02 11:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590829', 'tblTempUsageDetail_20' ) end [2025-03-02 11:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590829', 'tblTempVendorCDR_20' ) start [2025-03-02 11:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590829', 'tblTempVendorCDR_20' ) end [2025-03-02 11:29:17] Production.INFO: ProcessCDR(1,14590829,1,1,2) [2025-03-02 11:29:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590829,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:29:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590829,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:29:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590829,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:29:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590829,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:29:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590829', 'tblTempUsageDetail_20' ) start [2025-03-02 11:29:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590829', 'tblTempUsageDetail_20' ) end [2025-03-02 11:29:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:29:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:29:22] Production.INFO: ==8982== Releasing lock... [2025-03-02 11:29:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:29:22] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 11:30:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:30:05 [end_date_ymd] => 2025-03-02 11:30:05 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:30:05' and `end` < '2025-03-02 11: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-03-02 11:30:17] Production.INFO: count ==403 [2025-03-02 11:30:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:30:05 - End Time 2025-03-02 11:30:05 [2025-03-02 11:30:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590835', 'tblTempUsageDetail_20' ) start [2025-03-02 11:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590835', 'tblTempUsageDetail_20' ) end [2025-03-02 11:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590835', 'tblTempVendorCDR_20' ) start [2025-03-02 11:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590835', 'tblTempVendorCDR_20' ) end [2025-03-02 11:30:17] Production.INFO: ProcessCDR(1,14590835,1,1,2) [2025-03-02 11:30:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590835,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:30:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590835,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:30:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590835,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:30:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590835,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:30:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590835', 'tblTempUsageDetail_20' ) start [2025-03-02 11:30:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590835', 'tblTempUsageDetail_20' ) end [2025-03-02 11:30:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:30:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:30:21] Production.INFO: ==9117== Releasing lock... [2025-03-02 11:30:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:30:21] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 11:31:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:31:05 [end_date_ymd] => 2025-03-02 11:31:05 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:31:05' and `end` < '2025-03-02 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-03-02 11:31:18] Production.INFO: count ==418 [2025-03-02 11:31:18] Production.ERROR: pbx CDR StartTime 2025-03-02 08:31:05 - End Time 2025-03-02 11:31:05 [2025-03-02 11:31:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590840', 'tblTempUsageDetail_20' ) start [2025-03-02 11:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590840', 'tblTempUsageDetail_20' ) end [2025-03-02 11:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590840', 'tblTempVendorCDR_20' ) start [2025-03-02 11:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590840', 'tblTempVendorCDR_20' ) end [2025-03-02 11:31:18] Production.INFO: ProcessCDR(1,14590840,1,1,2) [2025-03-02 11:31:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590840,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:31:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590840,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:31:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590840,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:31:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590840,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:31:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590840', 'tblTempUsageDetail_20' ) start [2025-03-02 11:31:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590840', 'tblTempUsageDetail_20' ) end [2025-03-02 11:31:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:31:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:31:23] Production.INFO: ==9257== Releasing lock... [2025-03-02 11:31:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:31:23] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 11:32:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:32:06 [end_date_ymd] => 2025-03-02 11:32:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 08:32:06' and `end` < '2025-03-02 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-03-02 11:32:18] Production.INFO: count ==418 [2025-03-02 11:32:18] Production.ERROR: pbx CDR StartTime 2025-03-02 08:32:06 - End Time 2025-03-02 11:32:06 [2025-03-02 11:32:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:32:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590845', 'tblTempUsageDetail_20' ) start [2025-03-02 11:32:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590845', 'tblTempUsageDetail_20' ) end [2025-03-02 11:32:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590845', 'tblTempVendorCDR_20' ) start [2025-03-02 11:32:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590845', 'tblTempVendorCDR_20' ) end [2025-03-02 11:32:18] Production.INFO: ProcessCDR(1,14590845,1,1,2) [2025-03-02 11:32:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590845,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:32:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590845,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:32:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590845,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:32:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590845,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:32:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590845', 'tblTempUsageDetail_20' ) start [2025-03-02 11:32:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590845', 'tblTempUsageDetail_20' ) end [2025-03-02 11:32:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:32:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:32:22] Production.INFO: ==9397== Releasing lock... [2025-03-02 11:32:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:32:22] Production.INFO: 31.25 MB #Memory Used# [2025-03-02 11:33:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:33:06 [end_date_ymd] => 2025-03-02 11:33:06 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:33:06' and `end` < '2025-03-02 11: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-03-02 11:33:18] Production.INFO: count ==419 [2025-03-02 11:33:18] Production.ERROR: pbx CDR StartTime 2025-03-02 08:33:06 - End Time 2025-03-02 11:33:06 [2025-03-02 11:33:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590850', 'tblTempUsageDetail_20' ) start [2025-03-02 11:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590850', 'tblTempUsageDetail_20' ) end [2025-03-02 11:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590850', 'tblTempVendorCDR_20' ) start [2025-03-02 11:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590850', 'tblTempVendorCDR_20' ) end [2025-03-02 11:33:18] Production.INFO: ProcessCDR(1,14590850,1,1,2) [2025-03-02 11:33:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590850,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:33:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590850,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:33:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590850,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:33:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590850,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:33:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590850', 'tblTempUsageDetail_20' ) start [2025-03-02 11:33:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590850', 'tblTempUsageDetail_20' ) end [2025-03-02 11:33:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:33:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:33:23] Production.INFO: ==9511== Releasing lock... [2025-03-02 11:33:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:33:23] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 11:34:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:34:05 [end_date_ymd] => 2025-03-02 11:34:05 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:34:05' and `end` < '2025-03-02 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-03-02 11:34:17] Production.INFO: count ==420 [2025-03-02 11:34:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:34:05 - End Time 2025-03-02 11:34:05 [2025-03-02 11:34:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590855', 'tblTempUsageDetail_20' ) start [2025-03-02 11:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590855', 'tblTempUsageDetail_20' ) end [2025-03-02 11:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590855', 'tblTempVendorCDR_20' ) start [2025-03-02 11:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590855', 'tblTempVendorCDR_20' ) end [2025-03-02 11:34:17] Production.INFO: ProcessCDR(1,14590855,1,1,2) [2025-03-02 11:34:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590855,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:34:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590855,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:34:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590855,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:34:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590855,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:34:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590855', 'tblTempUsageDetail_20' ) start [2025-03-02 11:34:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590855', 'tblTempUsageDetail_20' ) end [2025-03-02 11:34:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:34:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:34:21] Production.INFO: ==9609== Releasing lock... [2025-03-02 11:34:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:34:21] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 11:35:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:35:05 [end_date_ymd] => 2025-03-02 11:35:05 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:35:05' and `end` < '2025-03-02 11: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-03-02 11:35:17] Production.INFO: count ==420 [2025-03-02 11:35:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:35:05 - End Time 2025-03-02 11:35:05 [2025-03-02 11:35:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590860', 'tblTempUsageDetail_20' ) start [2025-03-02 11:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590860', 'tblTempUsageDetail_20' ) end [2025-03-02 11:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590860', 'tblTempVendorCDR_20' ) start [2025-03-02 11:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590860', 'tblTempVendorCDR_20' ) end [2025-03-02 11:35:17] Production.INFO: ProcessCDR(1,14590860,1,1,2) [2025-03-02 11:35:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590860,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:35:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590860,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:35:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590860,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:35:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590860,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:35:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590860', 'tblTempUsageDetail_20' ) start [2025-03-02 11:35:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590860', 'tblTempUsageDetail_20' ) end [2025-03-02 11:35:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:35:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:35:20] Production.INFO: ==9691== Releasing lock... [2025-03-02 11:35:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:35:20] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 11:36:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:36:05 [end_date_ymd] => 2025-03-02 11:36:05 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:36:05' and `end` < '2025-03-02 11: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-03-02 11:36:17] Production.INFO: count ==431 [2025-03-02 11:36:18] Production.ERROR: pbx CDR StartTime 2025-03-02 08:36:05 - End Time 2025-03-02 11:36:05 [2025-03-02 11:36:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:36:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590865', 'tblTempUsageDetail_20' ) start [2025-03-02 11:36:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590865', 'tblTempUsageDetail_20' ) end [2025-03-02 11:36:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590865', 'tblTempVendorCDR_20' ) start [2025-03-02 11:36:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590865', 'tblTempVendorCDR_20' ) end [2025-03-02 11:36:18] Production.INFO: ProcessCDR(1,14590865,1,1,2) [2025-03-02 11:36:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590865,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:36:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590865,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:36:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590865,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:36:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590865,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:36:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590865', 'tblTempUsageDetail_20' ) start [2025-03-02 11:36:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590865', 'tblTempUsageDetail_20' ) end [2025-03-02 11:36:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:36:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:36:21] Production.INFO: ==9775== Releasing lock... [2025-03-02 11:36:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:36:21] Production.INFO: 31.5 MB #Memory Used# [2025-03-02 11:37:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:37:05 [end_date_ymd] => 2025-03-02 11:37:05 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:37:05' and `end` < '2025-03-02 11: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-03-02 11:37:17] Production.INFO: count ==439 [2025-03-02 11:37:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:37:05 - End Time 2025-03-02 11:37:05 [2025-03-02 11:37:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590870', 'tblTempUsageDetail_20' ) start [2025-03-02 11:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590870', 'tblTempUsageDetail_20' ) end [2025-03-02 11:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590870', 'tblTempVendorCDR_20' ) start [2025-03-02 11:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590870', 'tblTempVendorCDR_20' ) end [2025-03-02 11:37:18] Production.INFO: ProcessCDR(1,14590870,1,1,2) [2025-03-02 11:37:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590870,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:37:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590870,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:37:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590870,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:37:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590870,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590870', 'tblTempUsageDetail_20' ) start [2025-03-02 11:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590870', 'tblTempUsageDetail_20' ) end [2025-03-02 11:37:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:37:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:37:21] Production.INFO: ==9874== Releasing lock... [2025-03-02 11:37:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:37:21] Production.INFO: 31.75 MB #Memory Used# [2025-03-02 11:38:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:38:06 [end_date_ymd] => 2025-03-02 11:38:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 08:38:06' and `end` < '2025-03-02 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-03-02 11:38:18] Production.INFO: count ==461 [2025-03-02 11:38:18] Production.ERROR: pbx CDR StartTime 2025-03-02 08:38:06 - End Time 2025-03-02 11:38:06 [2025-03-02 11:38:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590875', 'tblTempUsageDetail_20' ) start [2025-03-02 11:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590875', 'tblTempUsageDetail_20' ) end [2025-03-02 11:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590875', 'tblTempVendorCDR_20' ) start [2025-03-02 11:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590875', 'tblTempVendorCDR_20' ) end [2025-03-02 11:38:18] Production.INFO: ProcessCDR(1,14590875,1,1,2) [2025-03-02 11:38:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590875,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:38:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590875,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:38:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590875,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:38:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590875,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590875', 'tblTempUsageDetail_20' ) start [2025-03-02 11:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590875', 'tblTempUsageDetail_20' ) end [2025-03-02 11:38:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:38:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:38:21] Production.INFO: ==9966== Releasing lock... [2025-03-02 11:38:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:38:21] Production.INFO: 32 MB #Memory Used# [2025-03-02 11:39:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:39:06 [end_date_ymd] => 2025-03-02 11:39:06 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:39:06' and `end` < '2025-03-02 11: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-03-02 11:39:18] Production.INFO: count ==467 [2025-03-02 11:39:18] Production.ERROR: pbx CDR StartTime 2025-03-02 08:39:06 - End Time 2025-03-02 11:39:06 [2025-03-02 11:39:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590880', 'tblTempUsageDetail_20' ) start [2025-03-02 11:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590880', 'tblTempUsageDetail_20' ) end [2025-03-02 11:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590880', 'tblTempVendorCDR_20' ) start [2025-03-02 11:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590880', 'tblTempVendorCDR_20' ) end [2025-03-02 11:39:18] Production.INFO: ProcessCDR(1,14590880,1,1,2) [2025-03-02 11:39:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590880,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:39:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590880,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:39:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590880,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:39:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590880,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:39:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590880', 'tblTempUsageDetail_20' ) start [2025-03-02 11:39:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590880', 'tblTempUsageDetail_20' ) end [2025-03-02 11:39:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:39:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:39:22] Production.INFO: ==10068== Releasing lock... [2025-03-02 11:39:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:39:22] Production.INFO: 32 MB #Memory Used# [2025-03-02 11:40:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:40:07 [end_date_ymd] => 2025-03-02 11:40:07 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:40:07' and `end` < '2025-03-02 11: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-03-02 11:40:19] Production.INFO: count ==480 [2025-03-02 11:40:19] Production.ERROR: pbx CDR StartTime 2025-03-02 08:40:07 - End Time 2025-03-02 11:40:07 [2025-03-02 11:40:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590886', 'tblTempUsageDetail_20' ) start [2025-03-02 11:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590886', 'tblTempUsageDetail_20' ) end [2025-03-02 11:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590886', 'tblTempVendorCDR_20' ) start [2025-03-02 11:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590886', 'tblTempVendorCDR_20' ) end [2025-03-02 11:40:19] Production.INFO: ProcessCDR(1,14590886,1,1,2) [2025-03-02 11:40:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590886,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:40:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590886,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:40:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590886,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:40:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590886,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:40:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590886', 'tblTempUsageDetail_20' ) start [2025-03-02 11:40:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590886', 'tblTempUsageDetail_20' ) end [2025-03-02 11:40:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:40:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:40:23] Production.INFO: ==10159== Releasing lock... [2025-03-02 11:40:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:40:23] Production.INFO: 32 MB #Memory Used# [2025-03-02 11:41:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:41:05 [end_date_ymd] => 2025-03-02 11:41:05 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:41:05' and `end` < '2025-03-02 11: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-03-02 11:41:17] Production.INFO: count ==513 [2025-03-02 11:41:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:41:05 - End Time 2025-03-02 11:41:05 [2025-03-02 11:41:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590891', 'tblTempUsageDetail_20' ) start [2025-03-02 11:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590891', 'tblTempUsageDetail_20' ) end [2025-03-02 11:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590891', 'tblTempVendorCDR_20' ) start [2025-03-02 11:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590891', 'tblTempVendorCDR_20' ) end [2025-03-02 11:41:17] Production.INFO: ProcessCDR(1,14590891,1,1,2) [2025-03-02 11:41:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590891,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:41:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590891,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:41:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590891,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:41:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590891,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:41:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590891', 'tblTempUsageDetail_20' ) start [2025-03-02 11:41:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590891', 'tblTempUsageDetail_20' ) end [2025-03-02 11:41:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:41:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:41:22] Production.INFO: ==10242== Releasing lock... [2025-03-02 11:41:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:41:22] Production.INFO: 32.25 MB #Memory Used# [2025-03-02 11:42:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:42:06 [end_date_ymd] => 2025-03-02 11:42:06 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:42:06' and `end` < '2025-03-02 11: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-03-02 11:42:18] Production.INFO: count ==533 [2025-03-02 11:42:18] Production.ERROR: pbx CDR StartTime 2025-03-02 08:42:06 - End Time 2025-03-02 11:42:06 [2025-03-02 11:42:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590896', 'tblTempUsageDetail_20' ) start [2025-03-02 11:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590896', 'tblTempUsageDetail_20' ) end [2025-03-02 11:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590896', 'tblTempVendorCDR_20' ) start [2025-03-02 11:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590896', 'tblTempVendorCDR_20' ) end [2025-03-02 11:42:18] Production.INFO: ProcessCDR(1,14590896,1,1,2) [2025-03-02 11:42:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590896,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:42:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590896,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:42:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590896,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:42:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590896,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:42:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590896', 'tblTempUsageDetail_20' ) start [2025-03-02 11:42:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590896', 'tblTempUsageDetail_20' ) end [2025-03-02 11:42:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:42:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:42:21] Production.INFO: ==10323== Releasing lock... [2025-03-02 11:42:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:42:21] Production.INFO: 32.75 MB #Memory Used# [2025-03-02 11:43:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:43:05 [end_date_ymd] => 2025-03-02 11:43:05 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:43:05' and `end` < '2025-03-02 11: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-03-02 11:43:17] Production.INFO: count ==539 [2025-03-02 11:43:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:43:05 - End Time 2025-03-02 11:43:05 [2025-03-02 11:43:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590901', 'tblTempUsageDetail_20' ) start [2025-03-02 11:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590901', 'tblTempUsageDetail_20' ) end [2025-03-02 11:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590901', 'tblTempVendorCDR_20' ) start [2025-03-02 11:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590901', 'tblTempVendorCDR_20' ) end [2025-03-02 11:43:17] Production.INFO: ProcessCDR(1,14590901,1,1,2) [2025-03-02 11:43:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590901,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:43:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590901,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:43:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590901,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:43:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590901,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:43:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590901', 'tblTempUsageDetail_20' ) start [2025-03-02 11:43:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590901', 'tblTempUsageDetail_20' ) end [2025-03-02 11:43:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:43:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:43:20] Production.INFO: ==10409== Releasing lock... [2025-03-02 11:43:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:43:20] Production.INFO: 32.75 MB #Memory Used# [2025-03-02 11:44:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:44:05 [end_date_ymd] => 2025-03-02 11:44:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 08:44:05' and `end` < '2025-03-02 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-03-02 11:44:17] Production.INFO: count ==544 [2025-03-02 11:44:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:44:05 - End Time 2025-03-02 11:44:05 [2025-03-02 11:44:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590906', 'tblTempUsageDetail_20' ) start [2025-03-02 11:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590906', 'tblTempUsageDetail_20' ) end [2025-03-02 11:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590906', 'tblTempVendorCDR_20' ) start [2025-03-02 11:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590906', 'tblTempVendorCDR_20' ) end [2025-03-02 11:44:17] Production.INFO: ProcessCDR(1,14590906,1,1,2) [2025-03-02 11:44:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590906,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:44:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590906,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:44:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590906,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:44:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590906,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590906', 'tblTempUsageDetail_20' ) start [2025-03-02 11:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590906', 'tblTempUsageDetail_20' ) end [2025-03-02 11:44:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:44:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:44:21] Production.INFO: ==10528== Releasing lock... [2025-03-02 11:44:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:44:21] Production.INFO: 33 MB #Memory Used# [2025-03-02 11:45:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:45:05 [end_date_ymd] => 2025-03-02 11:45:05 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:45:05' and `end` < '2025-03-02 11: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-03-02 11:45:17] Production.INFO: count ==550 [2025-03-02 11:45:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:45:05 - End Time 2025-03-02 11:45:05 [2025-03-02 11:45:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590911', 'tblTempUsageDetail_20' ) start [2025-03-02 11:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590911', 'tblTempUsageDetail_20' ) end [2025-03-02 11:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590911', 'tblTempVendorCDR_20' ) start [2025-03-02 11:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590911', 'tblTempVendorCDR_20' ) end [2025-03-02 11:45:17] Production.INFO: ProcessCDR(1,14590911,1,1,2) [2025-03-02 11:45:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590911,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:45:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590911,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:45:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590911,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:45:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590911,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:45:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590911', 'tblTempUsageDetail_20' ) start [2025-03-02 11:45:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590911', 'tblTempUsageDetail_20' ) end [2025-03-02 11:45:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:45:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:45:20] Production.INFO: ==10614== Releasing lock... [2025-03-02 11:45:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:45:20] Production.INFO: 33 MB #Memory Used# [2025-03-02 11:46:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:46:05 [end_date_ymd] => 2025-03-02 11:46:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 08:46:05' and `end` < '2025-03-02 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-03-02 11:46:18] Production.INFO: count ==572 [2025-03-02 11:46:18] Production.ERROR: pbx CDR StartTime 2025-03-02 08:46:05 - End Time 2025-03-02 11:46:05 [2025-03-02 11:46:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590916', 'tblTempUsageDetail_20' ) start [2025-03-02 11:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590916', 'tblTempUsageDetail_20' ) end [2025-03-02 11:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590916', 'tblTempVendorCDR_20' ) start [2025-03-02 11:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590916', 'tblTempVendorCDR_20' ) end [2025-03-02 11:46:18] Production.INFO: ProcessCDR(1,14590916,1,1,2) [2025-03-02 11:46:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590916,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:46:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590916,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:46:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590916,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:46:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590916,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590916', 'tblTempUsageDetail_20' ) start [2025-03-02 11:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590916', 'tblTempUsageDetail_20' ) end [2025-03-02 11:46:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:46:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:46:21] Production.INFO: ==10715== Releasing lock... [2025-03-02 11:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:46:21] Production.INFO: 33.25 MB #Memory Used# [2025-03-02 11:47:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:47:04 [end_date_ymd] => 2025-03-02 11:47:04 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:47:04' and `end` < '2025-03-02 11: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-03-02 11:47:16] Production.INFO: count ==577 [2025-03-02 11:47:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:47:04 - End Time 2025-03-02 11:47:04 [2025-03-02 11:47:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590921', 'tblTempUsageDetail_20' ) start [2025-03-02 11:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590921', 'tblTempUsageDetail_20' ) end [2025-03-02 11:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590921', 'tblTempVendorCDR_20' ) start [2025-03-02 11:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590921', 'tblTempVendorCDR_20' ) end [2025-03-02 11:47:17] Production.INFO: ProcessCDR(1,14590921,1,1,2) [2025-03-02 11:47:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590921,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:47:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590921,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:47:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590921,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:47:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590921,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:47:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590921', 'tblTempUsageDetail_20' ) start [2025-03-02 11:47:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590921', 'tblTempUsageDetail_20' ) end [2025-03-02 11:47:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:47:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:47:21] Production.INFO: ==10807== Releasing lock... [2025-03-02 11:47:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:47:21] Production.INFO: 33.25 MB #Memory Used# [2025-03-02 11:48:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:48:05 [end_date_ymd] => 2025-03-02 11:48:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 08:48:05' and `end` < '2025-03-02 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-03-02 11:48:17] Production.INFO: count ==577 [2025-03-02 11:48:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:48:05 - End Time 2025-03-02 11:48:05 [2025-03-02 11:48:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590926', 'tblTempUsageDetail_20' ) start [2025-03-02 11:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590926', 'tblTempUsageDetail_20' ) end [2025-03-02 11:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590926', 'tblTempVendorCDR_20' ) start [2025-03-02 11:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590926', 'tblTempVendorCDR_20' ) end [2025-03-02 11:48:17] Production.INFO: ProcessCDR(1,14590926,1,1,2) [2025-03-02 11:48:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590926,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:48:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590926,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:48:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590926,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:48:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590926,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:48:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590926', 'tblTempUsageDetail_20' ) start [2025-03-02 11:48:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590926', 'tblTempUsageDetail_20' ) end [2025-03-02 11:48:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:48:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:48:21] Production.INFO: ==10897== Releasing lock... [2025-03-02 11:48:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:48:21] Production.INFO: 33.25 MB #Memory Used# [2025-03-02 11:49:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:49:06 [end_date_ymd] => 2025-03-02 11:49:06 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:49:06' and `end` < '2025-03-02 11: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-03-02 11:49:17] Production.INFO: count ==578 [2025-03-02 11:49:18] Production.ERROR: pbx CDR StartTime 2025-03-02 08:49:06 - End Time 2025-03-02 11:49:06 [2025-03-02 11:49:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590931', 'tblTempUsageDetail_20' ) start [2025-03-02 11:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590931', 'tblTempUsageDetail_20' ) end [2025-03-02 11:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590931', 'tblTempVendorCDR_20' ) start [2025-03-02 11:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590931', 'tblTempVendorCDR_20' ) end [2025-03-02 11:49:18] Production.INFO: ProcessCDR(1,14590931,1,1,2) [2025-03-02 11:49:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590931,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:49:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590931,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:49:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590931,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:49:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590931,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:49:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590931', 'tblTempUsageDetail_20' ) start [2025-03-02 11:49:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590931', 'tblTempUsageDetail_20' ) end [2025-03-02 11:49:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:49:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:49:23] Production.INFO: ==10994== Releasing lock... [2025-03-02 11:49:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:49:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-02 11:50:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:50:06 [end_date_ymd] => 2025-03-02 11:50:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 08:50:06' and `end` < '2025-03-02 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-03-02 11:50:18] Production.INFO: count ==580 [2025-03-02 11:50:18] Production.ERROR: pbx CDR StartTime 2025-03-02 08:50:06 - End Time 2025-03-02 11:50:06 [2025-03-02 11:50:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590937', 'tblTempUsageDetail_20' ) start [2025-03-02 11:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590937', 'tblTempUsageDetail_20' ) end [2025-03-02 11:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590937', 'tblTempVendorCDR_20' ) start [2025-03-02 11:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590937', 'tblTempVendorCDR_20' ) end [2025-03-02 11:50:18] Production.INFO: ProcessCDR(1,14590937,1,1,2) [2025-03-02 11:50:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590937,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:50:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590937,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:50:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590937,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:50:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590937,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:50:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590937', 'tblTempUsageDetail_20' ) start [2025-03-02 11:50:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590937', 'tblTempUsageDetail_20' ) end [2025-03-02 11:50:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:50:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:50:22] Production.INFO: ==11079== Releasing lock... [2025-03-02 11:50:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:50:22] Production.INFO: 33.5 MB #Memory Used# [2025-03-02 11:51:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:51:06 [end_date_ymd] => 2025-03-02 11:51:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 08:51:06' and `end` < '2025-03-02 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-03-02 11:51:18] Production.INFO: count ==600 [2025-03-02 11:51:18] Production.ERROR: pbx CDR StartTime 2025-03-02 08:51:06 - End Time 2025-03-02 11:51:06 [2025-03-02 11:51:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590942', 'tblTempUsageDetail_20' ) start [2025-03-02 11:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590942', 'tblTempUsageDetail_20' ) end [2025-03-02 11:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590942', 'tblTempVendorCDR_20' ) start [2025-03-02 11:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590942', 'tblTempVendorCDR_20' ) end [2025-03-02 11:51:18] Production.INFO: ProcessCDR(1,14590942,1,1,2) [2025-03-02 11:51:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590942,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:51:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590942,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:51:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590942,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:51:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590942,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:51:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590942', 'tblTempUsageDetail_20' ) start [2025-03-02 11:51:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590942', 'tblTempUsageDetail_20' ) end [2025-03-02 11:51:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:51:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:51:21] Production.INFO: ==11172== Releasing lock... [2025-03-02 11:51:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:51:21] Production.INFO: 33 MB #Memory Used# [2025-03-02 11:52:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:52:05 [end_date_ymd] => 2025-03-02 11:52:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 08:52:05' and `end` < '2025-03-02 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-03-02 11:52:17] Production.INFO: count ==600 [2025-03-02 11:52:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:52:05 - End Time 2025-03-02 11:52:05 [2025-03-02 11:52:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590947', 'tblTempUsageDetail_20' ) start [2025-03-02 11:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590947', 'tblTempUsageDetail_20' ) end [2025-03-02 11:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590947', 'tblTempVendorCDR_20' ) start [2025-03-02 11:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590947', 'tblTempVendorCDR_20' ) end [2025-03-02 11:52:17] Production.INFO: ProcessCDR(1,14590947,1,1,2) [2025-03-02 11:52:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590947,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:52:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590947,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:52:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590947,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:52:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590947,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:52:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590947', 'tblTempUsageDetail_20' ) start [2025-03-02 11:52:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590947', 'tblTempUsageDetail_20' ) end [2025-03-02 11:52:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:52:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:52:20] Production.INFO: ==11259== Releasing lock... [2025-03-02 11:52:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:52:20] Production.INFO: 33 MB #Memory Used# [2025-03-02 11:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:53:05 [end_date_ymd] => 2025-03-02 11:53:05 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:53:05' and `end` < '2025-03-02 11: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-03-02 11:53:17] Production.INFO: count ==604 [2025-03-02 11:53:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:53:05 - End Time 2025-03-02 11:53:05 [2025-03-02 11:53:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590952', 'tblTempUsageDetail_20' ) start [2025-03-02 11:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590952', 'tblTempUsageDetail_20' ) end [2025-03-02 11:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590952', 'tblTempVendorCDR_20' ) start [2025-03-02 11:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590952', 'tblTempVendorCDR_20' ) end [2025-03-02 11:53:17] Production.INFO: ProcessCDR(1,14590952,1,1,2) [2025-03-02 11:53:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590952,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:53:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590952,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:53:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590952,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:53:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590952,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590952', 'tblTempUsageDetail_20' ) start [2025-03-02 11:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590952', 'tblTempUsageDetail_20' ) end [2025-03-02 11:53:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:53:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:53:21] Production.INFO: ==11367== Releasing lock... [2025-03-02 11:53:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:53:21] Production.INFO: 33.5 MB #Memory Used# [2025-03-02 11:54:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:54:05 [end_date_ymd] => 2025-03-02 11:54:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 08:54:05' and `end` < '2025-03-02 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-03-02 11:54:17] Production.INFO: count ==604 [2025-03-02 11:54:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:54:05 - End Time 2025-03-02 11:54:05 [2025-03-02 11:54:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590957', 'tblTempUsageDetail_20' ) start [2025-03-02 11:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590957', 'tblTempUsageDetail_20' ) end [2025-03-02 11:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590957', 'tblTempVendorCDR_20' ) start [2025-03-02 11:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590957', 'tblTempVendorCDR_20' ) end [2025-03-02 11:54:17] Production.INFO: ProcessCDR(1,14590957,1,1,2) [2025-03-02 11:54:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590957,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:54:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590957,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:54:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590957,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:54:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590957,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:54:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590957', 'tblTempUsageDetail_20' ) start [2025-03-02 11:54:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590957', 'tblTempUsageDetail_20' ) end [2025-03-02 11:54:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:54:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:54:20] Production.INFO: ==11462== Releasing lock... [2025-03-02 11:54:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:54:20] Production.INFO: 33.5 MB #Memory Used# [2025-03-02 11:55:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:55:05 [end_date_ymd] => 2025-03-02 11:55:05 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:55:05' and `end` < '2025-03-02 11: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-03-02 11:55:18] Production.INFO: count ==613 [2025-03-02 11:55:18] Production.ERROR: pbx CDR StartTime 2025-03-02 08:55:05 - End Time 2025-03-02 11:55:05 [2025-03-02 11:55:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590962', 'tblTempUsageDetail_20' ) start [2025-03-02 11:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590962', 'tblTempUsageDetail_20' ) end [2025-03-02 11:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590962', 'tblTempVendorCDR_20' ) start [2025-03-02 11:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590962', 'tblTempVendorCDR_20' ) end [2025-03-02 11:55:18] Production.INFO: ProcessCDR(1,14590962,1,1,2) [2025-03-02 11:55:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590962,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:55:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590962,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:55:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590962,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:55:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590962,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:55:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590962', 'tblTempUsageDetail_20' ) start [2025-03-02 11:55:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590962', 'tblTempUsageDetail_20' ) end [2025-03-02 11:55:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:55:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:55:23] Production.INFO: ==11555== Releasing lock... [2025-03-02 11:55:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:55:23] Production.INFO: 33.25 MB #Memory Used# [2025-03-02 11:56:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:56:05 [end_date_ymd] => 2025-03-02 11:56:05 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:56:05' and `end` < '2025-03-02 11: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-03-02 11:56:17] Production.INFO: count ==614 [2025-03-02 11:56:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:56:05 - End Time 2025-03-02 11:56:05 [2025-03-02 11:56:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590967', 'tblTempUsageDetail_20' ) start [2025-03-02 11:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590967', 'tblTempUsageDetail_20' ) end [2025-03-02 11:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590967', 'tblTempVendorCDR_20' ) start [2025-03-02 11:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590967', 'tblTempVendorCDR_20' ) end [2025-03-02 11:56:17] Production.INFO: ProcessCDR(1,14590967,1,1,2) [2025-03-02 11:56:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590967,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:56:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590967,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:56:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590967,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:56:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590967,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:56:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590967', 'tblTempUsageDetail_20' ) start [2025-03-02 11:56:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590967', 'tblTempUsageDetail_20' ) end [2025-03-02 11:56:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:56:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:56:20] Production.INFO: ==11643== Releasing lock... [2025-03-02 11:56:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:56:20] Production.INFO: 33.25 MB #Memory Used# [2025-03-02 11:57:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:57:05 [end_date_ymd] => 2025-03-02 11:57:05 [RateCDR] => 1 ) [2025-03-02 11: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-03-02 08:57:05' and `end` < '2025-03-02 11: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-03-02 11:57:17] Production.INFO: count ==615 [2025-03-02 11:57:18] Production.ERROR: pbx CDR StartTime 2025-03-02 08:57:05 - End Time 2025-03-02 11:57:05 [2025-03-02 11:57:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590972', 'tblTempUsageDetail_20' ) start [2025-03-02 11:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590972', 'tblTempUsageDetail_20' ) end [2025-03-02 11:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590972', 'tblTempVendorCDR_20' ) start [2025-03-02 11:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590972', 'tblTempVendorCDR_20' ) end [2025-03-02 11:57:18] Production.INFO: ProcessCDR(1,14590972,1,1,2) [2025-03-02 11:57:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590972,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:57:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590972,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:57:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590972,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:57:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590972,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:57:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590972', 'tblTempUsageDetail_20' ) start [2025-03-02 11:57:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590972', 'tblTempUsageDetail_20' ) end [2025-03-02 11:57:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:57:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:57:22] Production.INFO: ==11721== Releasing lock... [2025-03-02 11:57:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:57:22] Production.INFO: 33.5 MB #Memory Used# [2025-03-02 11:58:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:58:05 [end_date_ymd] => 2025-03-02 11:58:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 08:58:05' and `end` < '2025-03-02 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-03-02 11:58:17] Production.INFO: count ==615 [2025-03-02 11:58:17] Production.ERROR: pbx CDR StartTime 2025-03-02 08:58:05 - End Time 2025-03-02 11:58:05 [2025-03-02 11:58:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590977', 'tblTempUsageDetail_20' ) start [2025-03-02 11:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590977', 'tblTempUsageDetail_20' ) end [2025-03-02 11:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590977', 'tblTempVendorCDR_20' ) start [2025-03-02 11:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590977', 'tblTempVendorCDR_20' ) end [2025-03-02 11:58:17] Production.INFO: ProcessCDR(1,14590977,1,1,2) [2025-03-02 11:58:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590977,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:58:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590977,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:58:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590977,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:58:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590977,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:58:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590977', 'tblTempUsageDetail_20' ) start [2025-03-02 11:58:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590977', 'tblTempUsageDetail_20' ) end [2025-03-02 11:58:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:58:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:58:21] Production.INFO: ==11813== Releasing lock... [2025-03-02 11:58:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:58:21] Production.INFO: 33.5 MB #Memory Used# [2025-03-02 11:59:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 08:59:05 [end_date_ymd] => 2025-03-02 11:59:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 08:59:05' and `end` < '2025-03-02 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-03-02 11:59:17] Production.INFO: count ==615 [2025-03-02 11:59:18] Production.ERROR: pbx CDR StartTime 2025-03-02 08:59:05 - End Time 2025-03-02 11:59:05 [2025-03-02 11:59:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 11:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590982', 'tblTempUsageDetail_20' ) start [2025-03-02 11:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590982', 'tblTempUsageDetail_20' ) end [2025-03-02 11:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590982', 'tblTempVendorCDR_20' ) start [2025-03-02 11:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590982', 'tblTempVendorCDR_20' ) end [2025-03-02 11:59:18] Production.INFO: ProcessCDR(1,14590982,1,1,2) [2025-03-02 11:59:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590982,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:59:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590982,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 11:59:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590982,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:59:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590982,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 11:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590982', 'tblTempUsageDetail_20' ) start [2025-03-02 11:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590982', 'tblTempUsageDetail_20' ) end [2025-03-02 11:59:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 11:59:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 11:59:21] Production.INFO: ==11900== Releasing lock... [2025-03-02 11:59:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 11:59:21] Production.INFO: 33.5 MB #Memory Used# [2025-03-02 12:00:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:00:05 [end_date_ymd] => 2025-03-02 12:00:05 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:00:05' and `end` < '2025-03-02 12: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-03-02 12:00:17] Production.INFO: count ==622 [2025-03-02 12:00:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:00:05 - End Time 2025-03-02 12:00:05 [2025-03-02 12:00:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590988', 'tblTempUsageDetail_20' ) start [2025-03-02 12:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590988', 'tblTempUsageDetail_20' ) end [2025-03-02 12:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590988', 'tblTempVendorCDR_20' ) start [2025-03-02 12:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590988', 'tblTempVendorCDR_20' ) end [2025-03-02 12:00:17] Production.INFO: ProcessCDR(1,14590988,1,1,2) [2025-03-02 12:00:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590988,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:00:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590988,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:00:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590988,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:00:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590988,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:00:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590988', 'tblTempUsageDetail_20' ) start [2025-03-02 12:00:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590988', 'tblTempUsageDetail_20' ) end [2025-03-02 12:00:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:00:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:00:22] Production.INFO: ==12046== Releasing lock... [2025-03-02 12:00:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:00:22] Production.INFO: 33.5 MB #Memory Used# [2025-03-02 12:01:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:01:05 [end_date_ymd] => 2025-03-02 12:01:05 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:01:05' and `end` < '2025-03-02 12: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-03-02 12:01:17] Production.INFO: count ==640 [2025-03-02 12:01:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:01:05 - End Time 2025-03-02 12:01:05 [2025-03-02 12:01:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590993', 'tblTempUsageDetail_20' ) start [2025-03-02 12:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590993', 'tblTempUsageDetail_20' ) end [2025-03-02 12:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590993', 'tblTempVendorCDR_20' ) start [2025-03-02 12:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590993', 'tblTempVendorCDR_20' ) end [2025-03-02 12:01:17] Production.INFO: ProcessCDR(1,14590993,1,1,2) [2025-03-02 12:01:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590993,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:01:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590993,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:01:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590993,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:01:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590993,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590993', 'tblTempUsageDetail_20' ) start [2025-03-02 12:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590993', 'tblTempUsageDetail_20' ) end [2025-03-02 12:01:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:01:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:01:21] Production.INFO: ==12148== Releasing lock... [2025-03-02 12:01:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:01:21] Production.INFO: 33.25 MB #Memory Used# [2025-03-02 12:02:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:02:05 [end_date_ymd] => 2025-03-02 12:02:05 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:02:05' and `end` < '2025-03-02 12: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-03-02 12:02:17] Production.INFO: count ==640 [2025-03-02 12:02:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:02:05 - End Time 2025-03-02 12:02:05 [2025-03-02 12:02:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590998', 'tblTempUsageDetail_20' ) start [2025-03-02 12:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14590998', 'tblTempUsageDetail_20' ) end [2025-03-02 12:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590998', 'tblTempVendorCDR_20' ) start [2025-03-02 12:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14590998', 'tblTempVendorCDR_20' ) end [2025-03-02 12:02:17] Production.INFO: ProcessCDR(1,14590998,1,1,2) [2025-03-02 12:02:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14590998,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:02:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14590998,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:02:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14590998,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:02:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14590998,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:02:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590998', 'tblTempUsageDetail_20' ) start [2025-03-02 12:02:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14590998', 'tblTempUsageDetail_20' ) end [2025-03-02 12:02:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:02:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:02:21] Production.INFO: ==12231== Releasing lock... [2025-03-02 12:02:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:02:21] Production.INFO: 33.25 MB #Memory Used# [2025-03-02 12:03:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:03:05 [end_date_ymd] => 2025-03-02 12:03:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 09:03:05' and `end` < '2025-03-02 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-03-02 12:03:17] Production.INFO: count ==640 [2025-03-02 12:03:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:03:05 - End Time 2025-03-02 12:03:05 [2025-03-02 12:03:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591003', 'tblTempUsageDetail_20' ) start [2025-03-02 12:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591003', 'tblTempUsageDetail_20' ) end [2025-03-02 12:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591003', 'tblTempVendorCDR_20' ) start [2025-03-02 12:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591003', 'tblTempVendorCDR_20' ) end [2025-03-02 12:03:17] Production.INFO: ProcessCDR(1,14591003,1,1,2) [2025-03-02 12:03:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591003,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:03:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591003,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:03:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591003,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:03:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591003,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:03:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591003', 'tblTempUsageDetail_20' ) start [2025-03-02 12:03:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591003', 'tblTempUsageDetail_20' ) end [2025-03-02 12:03:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:03:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:03:21] Production.INFO: ==12328== Releasing lock... [2025-03-02 12:03:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:03:21] Production.INFO: 33.25 MB #Memory Used# [2025-03-02 12:04:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:04:05 [end_date_ymd] => 2025-03-02 12:04:05 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:04:05' and `end` < '2025-03-02 12: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-03-02 12:04:17] Production.INFO: count ==640 [2025-03-02 12:04:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:04:05 - End Time 2025-03-02 12:04:05 [2025-03-02 12:04:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591008', 'tblTempUsageDetail_20' ) start [2025-03-02 12:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591008', 'tblTempUsageDetail_20' ) end [2025-03-02 12:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591008', 'tblTempVendorCDR_20' ) start [2025-03-02 12:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591008', 'tblTempVendorCDR_20' ) end [2025-03-02 12:04:17] Production.INFO: ProcessCDR(1,14591008,1,1,2) [2025-03-02 12:04:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591008,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:04:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591008,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:04:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591008,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:04:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591008,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:04:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591008', 'tblTempUsageDetail_20' ) start [2025-03-02 12:04:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591008', 'tblTempUsageDetail_20' ) end [2025-03-02 12:04:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:04:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:04:20] Production.INFO: ==12425== Releasing lock... [2025-03-02 12:04:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:04:20] Production.INFO: 33.25 MB #Memory Used# [2025-03-02 12:05:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:05:05 [end_date_ymd] => 2025-03-02 12:05:05 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:05:05' and `end` < '2025-03-02 12: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-03-02 12:05:17] Production.INFO: count ==640 [2025-03-02 12:05:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:05:05 - End Time 2025-03-02 12:05:05 [2025-03-02 12:05:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591013', 'tblTempUsageDetail_20' ) start [2025-03-02 12:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591013', 'tblTempUsageDetail_20' ) end [2025-03-02 12:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591013', 'tblTempVendorCDR_20' ) start [2025-03-02 12:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591013', 'tblTempVendorCDR_20' ) end [2025-03-02 12:05:17] Production.INFO: ProcessCDR(1,14591013,1,1,2) [2025-03-02 12:05:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591013,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:05:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591013,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:05:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591013,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:05:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591013,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:05:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591013', 'tblTempUsageDetail_20' ) start [2025-03-02 12:05:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591013', 'tblTempUsageDetail_20' ) end [2025-03-02 12:05:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:05:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:05:21] Production.INFO: ==12522== Releasing lock... [2025-03-02 12:05:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:05:21] Production.INFO: 33.25 MB #Memory Used# [2025-03-02 12:06:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:06:05 [end_date_ymd] => 2025-03-02 12:06:05 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:06:05' and `end` < '2025-03-02 12: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-03-02 12:06:17] Production.INFO: count ==645 [2025-03-02 12:06:18] Production.ERROR: pbx CDR StartTime 2025-03-02 09:06:05 - End Time 2025-03-02 12:06:05 [2025-03-02 12:06:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:06:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591018', 'tblTempUsageDetail_20' ) start [2025-03-02 12:06:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591018', 'tblTempUsageDetail_20' ) end [2025-03-02 12:06:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591018', 'tblTempVendorCDR_20' ) start [2025-03-02 12:06:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591018', 'tblTempVendorCDR_20' ) end [2025-03-02 12:06:18] Production.INFO: ProcessCDR(1,14591018,1,1,2) [2025-03-02 12:06:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591018,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:06:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591018,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:06:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591018,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:06:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591018,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:06:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591018', 'tblTempUsageDetail_20' ) start [2025-03-02 12:06:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591018', 'tblTempUsageDetail_20' ) end [2025-03-02 12:06:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:06:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:06:21] Production.INFO: ==12626== Releasing lock... [2025-03-02 12:06:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:06:21] Production.INFO: 33.75 MB #Memory Used# [2025-03-02 12:07:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:07:05 [end_date_ymd] => 2025-03-02 12:07:05 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:07:05' and `end` < '2025-03-02 12: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-03-02 12:07:17] Production.INFO: count ==651 [2025-03-02 12:07:18] Production.ERROR: pbx CDR StartTime 2025-03-02 09:07:05 - End Time 2025-03-02 12:07:05 [2025-03-02 12:07:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591023', 'tblTempUsageDetail_20' ) start [2025-03-02 12:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591023', 'tblTempUsageDetail_20' ) end [2025-03-02 12:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591023', 'tblTempVendorCDR_20' ) start [2025-03-02 12:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591023', 'tblTempVendorCDR_20' ) end [2025-03-02 12:07:18] Production.INFO: ProcessCDR(1,14591023,1,1,2) [2025-03-02 12:07:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591023,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:07:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591023,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:07:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591023,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:07:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591023,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:07:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591023', 'tblTempUsageDetail_20' ) start [2025-03-02 12:07:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591023', 'tblTempUsageDetail_20' ) end [2025-03-02 12:07:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:07:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:07:21] Production.INFO: ==12714== Releasing lock... [2025-03-02 12:07:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:07:21] Production.INFO: 33.75 MB #Memory Used# [2025-03-02 12:08:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:08:05 [end_date_ymd] => 2025-03-02 12:08:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 09:08:05' and `end` < '2025-03-02 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-03-02 12:08:18] Production.INFO: count ==657 [2025-03-02 12:08:18] Production.ERROR: pbx CDR StartTime 2025-03-02 09:08:05 - End Time 2025-03-02 12:08:05 [2025-03-02 12:08:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591028', 'tblTempUsageDetail_20' ) start [2025-03-02 12:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591028', 'tblTempUsageDetail_20' ) end [2025-03-02 12:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591028', 'tblTempVendorCDR_20' ) start [2025-03-02 12:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591028', 'tblTempVendorCDR_20' ) end [2025-03-02 12:08:18] Production.INFO: ProcessCDR(1,14591028,1,1,2) [2025-03-02 12:08:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591028,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:08:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591028,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:08:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591028,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:08:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591028,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:08:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591028', 'tblTempUsageDetail_20' ) start [2025-03-02 12:08:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591028', 'tblTempUsageDetail_20' ) end [2025-03-02 12:08:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:08:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:08:22] Production.INFO: ==12814== Releasing lock... [2025-03-02 12:08:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:08:22] Production.INFO: 33.25 MB #Memory Used# [2025-03-02 12:09:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:09:05 [end_date_ymd] => 2025-03-02 12:09:05 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:09:05' and `end` < '2025-03-02 12: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-03-02 12:09:17] Production.INFO: count ==667 [2025-03-02 12:09:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:09:05 - End Time 2025-03-02 12:09:05 [2025-03-02 12:09:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591033', 'tblTempUsageDetail_20' ) start [2025-03-02 12:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591033', 'tblTempUsageDetail_20' ) end [2025-03-02 12:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591033', 'tblTempVendorCDR_20' ) start [2025-03-02 12:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591033', 'tblTempVendorCDR_20' ) end [2025-03-02 12:09:17] Production.INFO: ProcessCDR(1,14591033,1,1,2) [2025-03-02 12:09:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591033,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:09:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591033,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:09:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591033,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:09:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591033,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:09:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591033', 'tblTempUsageDetail_20' ) start [2025-03-02 12:09:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591033', 'tblTempUsageDetail_20' ) end [2025-03-02 12:09:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:09:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:09:22] Production.INFO: ==12916== Releasing lock... [2025-03-02 12:09:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:09:22] Production.INFO: 34 MB #Memory Used# [2025-03-02 12:10:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:10:06 [end_date_ymd] => 2025-03-02 12:10:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 09:10:06' and `end` < '2025-03-02 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-03-02 12:10:18] Production.INFO: count ==672 [2025-03-02 12:10:18] Production.ERROR: pbx CDR StartTime 2025-03-02 09:10:06 - End Time 2025-03-02 12:10:06 [2025-03-02 12:10:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591039', 'tblTempUsageDetail_20' ) start [2025-03-02 12:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591039', 'tblTempUsageDetail_20' ) end [2025-03-02 12:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591039', 'tblTempVendorCDR_20' ) start [2025-03-02 12:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591039', 'tblTempVendorCDR_20' ) end [2025-03-02 12:10:18] Production.INFO: ProcessCDR(1,14591039,1,1,2) [2025-03-02 12:10:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591039,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:10:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591039,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:10:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591039,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:10:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591039,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:10:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591039', 'tblTempUsageDetail_20' ) start [2025-03-02 12:10:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591039', 'tblTempUsageDetail_20' ) end [2025-03-02 12:10:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:10:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:10:22] Production.INFO: ==13010== Releasing lock... [2025-03-02 12:10:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:10:22] Production.INFO: 34 MB #Memory Used# [2025-03-02 12:11:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:11:05 [end_date_ymd] => 2025-03-02 12:11:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 09:11:05' and `end` < '2025-03-02 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-03-02 12:11:17] Production.INFO: count ==723 [2025-03-02 12:11:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:11:05 - End Time 2025-03-02 12:11:05 [2025-03-02 12:11:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591044', 'tblTempUsageDetail_20' ) start [2025-03-02 12:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591044', 'tblTempUsageDetail_20' ) end [2025-03-02 12:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591044', 'tblTempVendorCDR_20' ) start [2025-03-02 12:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591044', 'tblTempVendorCDR_20' ) end [2025-03-02 12:11:17] Production.INFO: ProcessCDR(1,14591044,1,1,2) [2025-03-02 12:11:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591044,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:11:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591044,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:11:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591044,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:11:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591044,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:11:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591044', 'tblTempUsageDetail_20' ) start [2025-03-02 12:11:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591044', 'tblTempUsageDetail_20' ) end [2025-03-02 12:11:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:11:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:11:22] Production.INFO: ==13109== Releasing lock... [2025-03-02 12:11:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:11:22] Production.INFO: 33.75 MB #Memory Used# [2025-03-02 12:12:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:12:05 [end_date_ymd] => 2025-03-02 12:12:05 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:12:05' and `end` < '2025-03-02 12: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-03-02 12:12:17] Production.INFO: count ==726 [2025-03-02 12:12:18] Production.ERROR: pbx CDR StartTime 2025-03-02 09:12:05 - End Time 2025-03-02 12:12:05 [2025-03-02 12:12:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591049', 'tblTempUsageDetail_20' ) start [2025-03-02 12:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591049', 'tblTempUsageDetail_20' ) end [2025-03-02 12:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591049', 'tblTempVendorCDR_20' ) start [2025-03-02 12:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591049', 'tblTempVendorCDR_20' ) end [2025-03-02 12:12:18] Production.INFO: ProcessCDR(1,14591049,1,1,2) [2025-03-02 12:12:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591049,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:12:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591049,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:12:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591049,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:12:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591049,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:12:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591049', 'tblTempUsageDetail_20' ) start [2025-03-02 12:12:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591049', 'tblTempUsageDetail_20' ) end [2025-03-02 12:12:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:12:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:12:22] Production.INFO: ==13201== Releasing lock... [2025-03-02 12:12:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:12:22] Production.INFO: 33.5 MB #Memory Used# [2025-03-02 12:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:13:05 [end_date_ymd] => 2025-03-02 12:13:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 09:13:05' and `end` < '2025-03-02 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-03-02 12:13:17] Production.INFO: count ==729 [2025-03-02 12:13:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:13:05 - End Time 2025-03-02 12:13:05 [2025-03-02 12:13:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591054', 'tblTempUsageDetail_20' ) start [2025-03-02 12:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591054', 'tblTempUsageDetail_20' ) end [2025-03-02 12:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591054', 'tblTempVendorCDR_20' ) start [2025-03-02 12:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591054', 'tblTempVendorCDR_20' ) end [2025-03-02 12:13:17] Production.INFO: ProcessCDR(1,14591054,1,1,2) [2025-03-02 12:13:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591054,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:13:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591054,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:13:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591054,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:13:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591054,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:13:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591054', 'tblTempUsageDetail_20' ) start [2025-03-02 12:13:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591054', 'tblTempUsageDetail_20' ) end [2025-03-02 12:13:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:13:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:13:22] Production.INFO: ==13297== Releasing lock... [2025-03-02 12:13:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:13:22] Production.INFO: 34 MB #Memory Used# [2025-03-02 12:14:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:14:06 [end_date_ymd] => 2025-03-02 12:14:06 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:14:06' and `end` < '2025-03-02 12: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-03-02 12:14:18] Production.INFO: count ==730 [2025-03-02 12:14:18] Production.ERROR: pbx CDR StartTime 2025-03-02 09:14:06 - End Time 2025-03-02 12:14:06 [2025-03-02 12:14:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591059', 'tblTempUsageDetail_20' ) start [2025-03-02 12:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591059', 'tblTempUsageDetail_20' ) end [2025-03-02 12:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591059', 'tblTempVendorCDR_20' ) start [2025-03-02 12:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591059', 'tblTempVendorCDR_20' ) end [2025-03-02 12:14:18] Production.INFO: ProcessCDR(1,14591059,1,1,2) [2025-03-02 12:14:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591059,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:14:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591059,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:14:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591059,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:14:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591059,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:14:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591059', 'tblTempUsageDetail_20' ) start [2025-03-02 12:14:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591059', 'tblTempUsageDetail_20' ) end [2025-03-02 12:14:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:14:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:14:23] Production.INFO: ==13387== Releasing lock... [2025-03-02 12:14:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:14:23] Production.INFO: 34 MB #Memory Used# [2025-03-02 12:15:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:15:05 [end_date_ymd] => 2025-03-02 12:15:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 09:15:05' and `end` < '2025-03-02 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-03-02 12:15:17] Production.INFO: count ==732 [2025-03-02 12:15:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:15:05 - End Time 2025-03-02 12:15:05 [2025-03-02 12:15:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591064', 'tblTempUsageDetail_20' ) start [2025-03-02 12:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591064', 'tblTempUsageDetail_20' ) end [2025-03-02 12:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591064', 'tblTempVendorCDR_20' ) start [2025-03-02 12:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591064', 'tblTempVendorCDR_20' ) end [2025-03-02 12:15:17] Production.INFO: ProcessCDR(1,14591064,1,1,2) [2025-03-02 12:15:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591064,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:15:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591064,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:15:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591064,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:15:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591064,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:15:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591064', 'tblTempUsageDetail_20' ) start [2025-03-02 12:15:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591064', 'tblTempUsageDetail_20' ) end [2025-03-02 12:15:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:15:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:15:22] Production.INFO: ==13511== Releasing lock... [2025-03-02 12:15:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:15:22] Production.INFO: 34.25 MB #Memory Used# [2025-03-02 12:16:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:16:05 [end_date_ymd] => 2025-03-02 12:16:05 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:16:05' and `end` < '2025-03-02 12: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-03-02 12:16:17] Production.INFO: count ==734 [2025-03-02 12:16:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:16:05 - End Time 2025-03-02 12:16:05 [2025-03-02 12:16:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591069', 'tblTempUsageDetail_20' ) start [2025-03-02 12:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591069', 'tblTempUsageDetail_20' ) end [2025-03-02 12:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591069', 'tblTempVendorCDR_20' ) start [2025-03-02 12:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591069', 'tblTempVendorCDR_20' ) end [2025-03-02 12:16:17] Production.INFO: ProcessCDR(1,14591069,1,1,2) [2025-03-02 12:16:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591069,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:16:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591069,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:16:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591069,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:16:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591069,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:16:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591069', 'tblTempUsageDetail_20' ) start [2025-03-02 12:16:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591069', 'tblTempUsageDetail_20' ) end [2025-03-02 12:16:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:16:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:16:22] Production.INFO: ==13602== Releasing lock... [2025-03-02 12:16:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:16:22] Production.INFO: 34.25 MB #Memory Used# [2025-03-02 12:17:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:17:06 [end_date_ymd] => 2025-03-02 12:17:06 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:17:06' and `end` < '2025-03-02 12: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-03-02 12:17:18] Production.INFO: count ==736 [2025-03-02 12:17:18] Production.ERROR: pbx CDR StartTime 2025-03-02 09:17:06 - End Time 2025-03-02 12:17:06 [2025-03-02 12:17:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591074', 'tblTempUsageDetail_20' ) start [2025-03-02 12:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591074', 'tblTempUsageDetail_20' ) end [2025-03-02 12:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591074', 'tblTempVendorCDR_20' ) start [2025-03-02 12:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591074', 'tblTempVendorCDR_20' ) end [2025-03-02 12:17:18] Production.INFO: ProcessCDR(1,14591074,1,1,2) [2025-03-02 12:17:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591074,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:17:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591074,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:17:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591074,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:17:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591074,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:17:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591074', 'tblTempUsageDetail_20' ) start [2025-03-02 12:17:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591074', 'tblTempUsageDetail_20' ) end [2025-03-02 12:17:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:17:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:17:22] Production.INFO: ==13690== Releasing lock... [2025-03-02 12:17:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:17:22] Production.INFO: 34 MB #Memory Used# [2025-03-02 12:18:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:18:05 [end_date_ymd] => 2025-03-02 12:18:05 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:18:05' and `end` < '2025-03-02 12: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-03-02 12:18:17] Production.INFO: count ==746 [2025-03-02 12:18:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:18:05 - End Time 2025-03-02 12:18:05 [2025-03-02 12:18:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591079', 'tblTempUsageDetail_20' ) start [2025-03-02 12:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591079', 'tblTempUsageDetail_20' ) end [2025-03-02 12:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591079', 'tblTempVendorCDR_20' ) start [2025-03-02 12:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591079', 'tblTempVendorCDR_20' ) end [2025-03-02 12:18:17] Production.INFO: ProcessCDR(1,14591079,1,1,2) [2025-03-02 12:18:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591079,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:18:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591079,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:18:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591079,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:18:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591079,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:18:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591079', 'tblTempUsageDetail_20' ) start [2025-03-02 12:18:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591079', 'tblTempUsageDetail_20' ) end [2025-03-02 12:18:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:18:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:18:22] Production.INFO: ==13787== Releasing lock... [2025-03-02 12:18:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:18:22] Production.INFO: 34.25 MB #Memory Used# [2025-03-02 12:19:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:19:05 [end_date_ymd] => 2025-03-02 12:19:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 09:19:05' and `end` < '2025-03-02 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-03-02 12:19:17] Production.INFO: count ==749 [2025-03-02 12:19:18] Production.ERROR: pbx CDR StartTime 2025-03-02 09:19:05 - End Time 2025-03-02 12:19:05 [2025-03-02 12:19:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591084', 'tblTempUsageDetail_20' ) start [2025-03-02 12:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591084', 'tblTempUsageDetail_20' ) end [2025-03-02 12:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591084', 'tblTempVendorCDR_20' ) start [2025-03-02 12:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591084', 'tblTempVendorCDR_20' ) end [2025-03-02 12:19:18] Production.INFO: ProcessCDR(1,14591084,1,1,2) [2025-03-02 12:19:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591084,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:19:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591084,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:19:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591084,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:19:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591084,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:19:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591084', 'tblTempUsageDetail_20' ) start [2025-03-02 12:19:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591084', 'tblTempUsageDetail_20' ) end [2025-03-02 12:19:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:19:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:19:22] Production.INFO: ==13877== Releasing lock... [2025-03-02 12:19:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:19:22] Production.INFO: 34 MB #Memory Used# [2025-03-02 12:20:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:20:06 [end_date_ymd] => 2025-03-02 12:20:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 09:20:06' and `end` < '2025-03-02 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-03-02 12:20:18] Production.INFO: count ==765 [2025-03-02 12:20:18] Production.ERROR: pbx CDR StartTime 2025-03-02 09:20:06 - End Time 2025-03-02 12:20:06 [2025-03-02 12:20:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591090', 'tblTempUsageDetail_20' ) start [2025-03-02 12:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591090', 'tblTempUsageDetail_20' ) end [2025-03-02 12:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591090', 'tblTempVendorCDR_20' ) start [2025-03-02 12:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591090', 'tblTempVendorCDR_20' ) end [2025-03-02 12:20:18] Production.INFO: ProcessCDR(1,14591090,1,1,2) [2025-03-02 12:20:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591090,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:20:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591090,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:20:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591090,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:20:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591090,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:20:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591090', 'tblTempUsageDetail_20' ) start [2025-03-02 12:20:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591090', 'tblTempUsageDetail_20' ) end [2025-03-02 12:20:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:20:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:20:21] Production.INFO: ==13955== Releasing lock... [2025-03-02 12:20:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:20:21] Production.INFO: 34.25 MB #Memory Used# [2025-03-02 12:21:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:21:05 [end_date_ymd] => 2025-03-02 12:21:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 09:21:05' and `end` < '2025-03-02 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-03-02 12:21:17] Production.INFO: count ==825 [2025-03-02 12:21:18] Production.ERROR: pbx CDR StartTime 2025-03-02 09:21:05 - End Time 2025-03-02 12:21:05 [2025-03-02 12:21:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:21:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591095', 'tblTempUsageDetail_20' ) start [2025-03-02 12:21:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591095', 'tblTempUsageDetail_20' ) end [2025-03-02 12:21:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591095', 'tblTempVendorCDR_20' ) start [2025-03-02 12:21:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591095', 'tblTempVendorCDR_20' ) end [2025-03-02 12:21:18] Production.INFO: ProcessCDR(1,14591095,1,1,2) [2025-03-02 12:21:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591095,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:21:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591095,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:21:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591095,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:21:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591095,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:21:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591095', 'tblTempUsageDetail_20' ) start [2025-03-02 12:21:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591095', 'tblTempUsageDetail_20' ) end [2025-03-02 12:21:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:21:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:21:23] Production.INFO: ==14028== Releasing lock... [2025-03-02 12:21:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:21:23] Production.INFO: 34.25 MB #Memory Used# [2025-03-02 12:22:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:22:05 [end_date_ymd] => 2025-03-02 12:22:05 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:22:05' and `end` < '2025-03-02 12: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-03-02 12:22:17] Production.INFO: count ==832 [2025-03-02 12:22:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:22:05 - End Time 2025-03-02 12:22:05 [2025-03-02 12:22:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591100', 'tblTempUsageDetail_20' ) start [2025-03-02 12:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591100', 'tblTempUsageDetail_20' ) end [2025-03-02 12:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591100', 'tblTempVendorCDR_20' ) start [2025-03-02 12:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591100', 'tblTempVendorCDR_20' ) end [2025-03-02 12:22:17] Production.INFO: ProcessCDR(1,14591100,1,1,2) [2025-03-02 12:22:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591100,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:22:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591100,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:22:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591100,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:22:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591100,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:22:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591100', 'tblTempUsageDetail_20' ) start [2025-03-02 12:22:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591100', 'tblTempUsageDetail_20' ) end [2025-03-02 12:22:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:22:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:22:22] Production.INFO: ==14116== Releasing lock... [2025-03-02 12:22:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:22:22] Production.INFO: 34.75 MB #Memory Used# [2025-03-02 12:23:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:23:05 [end_date_ymd] => 2025-03-02 12:23:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 09:23:05' and `end` < '2025-03-02 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-03-02 12:23:17] Production.INFO: count ==832 [2025-03-02 12:23:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:23:05 - End Time 2025-03-02 12:23:05 [2025-03-02 12:23:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591105', 'tblTempUsageDetail_20' ) start [2025-03-02 12:23:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591105', 'tblTempUsageDetail_20' ) end [2025-03-02 12:23:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591105', 'tblTempVendorCDR_20' ) start [2025-03-02 12:23:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591105', 'tblTempVendorCDR_20' ) end [2025-03-02 12:23:18] Production.INFO: ProcessCDR(1,14591105,1,1,2) [2025-03-02 12:23:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591105,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:23:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591105,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:23:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591105,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:23:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591105,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:23:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591105', 'tblTempUsageDetail_20' ) start [2025-03-02 12:23:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591105', 'tblTempUsageDetail_20' ) end [2025-03-02 12:23:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:23:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:23:21] Production.INFO: ==14196== Releasing lock... [2025-03-02 12:23:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:23:21] Production.INFO: 34.75 MB #Memory Used# [2025-03-02 12:24:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:24:05 [end_date_ymd] => 2025-03-02 12:24:05 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:24:05' and `end` < '2025-03-02 12: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-03-02 12:24:17] Production.INFO: count ==843 [2025-03-02 12:24:18] Production.ERROR: pbx CDR StartTime 2025-03-02 09:24:05 - End Time 2025-03-02 12:24:05 [2025-03-02 12:24:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591110', 'tblTempUsageDetail_20' ) start [2025-03-02 12:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591110', 'tblTempUsageDetail_20' ) end [2025-03-02 12:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591110', 'tblTempVendorCDR_20' ) start [2025-03-02 12:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591110', 'tblTempVendorCDR_20' ) end [2025-03-02 12:24:18] Production.INFO: ProcessCDR(1,14591110,1,1,2) [2025-03-02 12:24:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591110,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:24:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591110,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:24:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591110,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:24:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591110,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591110', 'tblTempUsageDetail_20' ) start [2025-03-02 12:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591110', 'tblTempUsageDetail_20' ) end [2025-03-02 12:24:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:24:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:24:21] Production.INFO: ==14274== Releasing lock... [2025-03-02 12:24:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:24:21] Production.INFO: 34.75 MB #Memory Used# [2025-03-02 12:25:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:25:05 [end_date_ymd] => 2025-03-02 12:25:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 09:25:05' and `end` < '2025-03-02 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-03-02 12:25:17] Production.INFO: count ==843 [2025-03-02 12:25:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:25:05 - End Time 2025-03-02 12:25:05 [2025-03-02 12:25:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591115', 'tblTempUsageDetail_20' ) start [2025-03-02 12:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591115', 'tblTempUsageDetail_20' ) end [2025-03-02 12:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591115', 'tblTempVendorCDR_20' ) start [2025-03-02 12:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591115', 'tblTempVendorCDR_20' ) end [2025-03-02 12:25:18] Production.INFO: ProcessCDR(1,14591115,1,1,2) [2025-03-02 12:25:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591115,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:25:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591115,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:25:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591115,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:25:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591115,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591115', 'tblTempUsageDetail_20' ) start [2025-03-02 12:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591115', 'tblTempUsageDetail_20' ) end [2025-03-02 12:25:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:25:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:25:21] Production.INFO: ==14347== Releasing lock... [2025-03-02 12:25:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:25:21] Production.INFO: 34.75 MB #Memory Used# [2025-03-02 12:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:26:05 [end_date_ymd] => 2025-03-02 12:26:05 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:26:05' and `end` < '2025-03-02 12: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-03-02 12:26:17] Production.INFO: count ==843 [2025-03-02 12:26:18] Production.ERROR: pbx CDR StartTime 2025-03-02 09:26:05 - End Time 2025-03-02 12:26:05 [2025-03-02 12:26:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591120', 'tblTempUsageDetail_20' ) start [2025-03-02 12:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591120', 'tblTempUsageDetail_20' ) end [2025-03-02 12:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591120', 'tblTempVendorCDR_20' ) start [2025-03-02 12:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591120', 'tblTempVendorCDR_20' ) end [2025-03-02 12:26:18] Production.INFO: ProcessCDR(1,14591120,1,1,2) [2025-03-02 12:26:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591120,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:26:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591120,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:26:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591120,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:26:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591120,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:26:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591120', 'tblTempUsageDetail_20' ) start [2025-03-02 12:26:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591120', 'tblTempUsageDetail_20' ) end [2025-03-02 12:26:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:26:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:26:21] Production.INFO: ==14432== Releasing lock... [2025-03-02 12:26:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:26:21] Production.INFO: 34.75 MB #Memory Used# [2025-03-02 12:27:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:27:05 [end_date_ymd] => 2025-03-02 12:27:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 09:27:05' and `end` < '2025-03-02 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-03-02 12:27:17] Production.INFO: count ==846 [2025-03-02 12:27:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:27:05 - End Time 2025-03-02 12:27:05 [2025-03-02 12:27:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591125', 'tblTempUsageDetail_20' ) start [2025-03-02 12:27:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591125', 'tblTempUsageDetail_20' ) end [2025-03-02 12:27:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591125', 'tblTempVendorCDR_20' ) start [2025-03-02 12:27:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591125', 'tblTempVendorCDR_20' ) end [2025-03-02 12:27:18] Production.INFO: ProcessCDR(1,14591125,1,1,2) [2025-03-02 12:27:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591125,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:27:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591125,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:27:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591125,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:27:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591125,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:27:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591125', 'tblTempUsageDetail_20' ) start [2025-03-02 12:27:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591125', 'tblTempUsageDetail_20' ) end [2025-03-02 12:27:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:27:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:27:22] Production.INFO: ==14515== Releasing lock... [2025-03-02 12:27:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:27:22] Production.INFO: 34.25 MB #Memory Used# [2025-03-02 12:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:28:05 [end_date_ymd] => 2025-03-02 12:28:05 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:28:05' and `end` < '2025-03-02 12: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-03-02 12:28:17] Production.INFO: count ==852 [2025-03-02 12:28:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:28:05 - End Time 2025-03-02 12:28:05 [2025-03-02 12:28:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591130', 'tblTempUsageDetail_20' ) start [2025-03-02 12:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591130', 'tblTempUsageDetail_20' ) end [2025-03-02 12:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591130', 'tblTempVendorCDR_20' ) start [2025-03-02 12:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591130', 'tblTempVendorCDR_20' ) end [2025-03-02 12:28:17] Production.INFO: ProcessCDR(1,14591130,1,1,2) [2025-03-02 12:28:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591130,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:28:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591130,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:28:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591130,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:28:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591130,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:28:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591130', 'tblTempUsageDetail_20' ) start [2025-03-02 12:28:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591130', 'tblTempUsageDetail_20' ) end [2025-03-02 12:28:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:28:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:28:20] Production.INFO: ==14591== Releasing lock... [2025-03-02 12:28:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:28:20] Production.INFO: 34.75 MB #Memory Used# [2025-03-02 12:29:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:29:05 [end_date_ymd] => 2025-03-02 12:29:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 09:29:05' and `end` < '2025-03-02 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-03-02 12:29:17] Production.INFO: count ==853 [2025-03-02 12:29:18] Production.ERROR: pbx CDR StartTime 2025-03-02 09:29:05 - End Time 2025-03-02 12:29:05 [2025-03-02 12:29:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591135', 'tblTempUsageDetail_20' ) start [2025-03-02 12:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591135', 'tblTempUsageDetail_20' ) end [2025-03-02 12:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591135', 'tblTempVendorCDR_20' ) start [2025-03-02 12:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591135', 'tblTempVendorCDR_20' ) end [2025-03-02 12:29:18] Production.INFO: ProcessCDR(1,14591135,1,1,2) [2025-03-02 12:29:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591135,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:29:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591135,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:29:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591135,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:29:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591135,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:29:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591135', 'tblTempUsageDetail_20' ) start [2025-03-02 12:29:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591135', 'tblTempUsageDetail_20' ) end [2025-03-02 12:29:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:29:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:29:22] Production.INFO: ==14667== Releasing lock... [2025-03-02 12:29:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:29:22] Production.INFO: 34.5 MB #Memory Used# [2025-03-02 12:30:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:30:06 [end_date_ymd] => 2025-03-02 12:30:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 09:30:06' and `end` < '2025-03-02 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-03-02 12:30:18] Production.INFO: count ==861 [2025-03-02 12:30:18] Production.ERROR: pbx CDR StartTime 2025-03-02 09:30:06 - End Time 2025-03-02 12:30:06 [2025-03-02 12:30:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591141', 'tblTempUsageDetail_20' ) start [2025-03-02 12:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591141', 'tblTempUsageDetail_20' ) end [2025-03-02 12:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591141', 'tblTempVendorCDR_20' ) start [2025-03-02 12:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591141', 'tblTempVendorCDR_20' ) end [2025-03-02 12:30:18] Production.INFO: ProcessCDR(1,14591141,1,1,2) [2025-03-02 12:30:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591141,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:30:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591141,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:30:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591141,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:30:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591141,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:30:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591141', 'tblTempUsageDetail_20' ) start [2025-03-02 12:30:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591141', 'tblTempUsageDetail_20' ) end [2025-03-02 12:30:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:30:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:30:23] Production.INFO: ==14803== Releasing lock... [2025-03-02 12:30:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:30:23] Production.INFO: 34.75 MB #Memory Used# [2025-03-02 12:31:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:31:05 [end_date_ymd] => 2025-03-02 12:31:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 09:31:05' and `end` < '2025-03-02 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-03-02 12:31:17] Production.INFO: count ==892 [2025-03-02 12:31:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:31:05 - End Time 2025-03-02 12:31:05 [2025-03-02 12:31:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591146', 'tblTempUsageDetail_20' ) start [2025-03-02 12:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591146', 'tblTempUsageDetail_20' ) end [2025-03-02 12:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591146', 'tblTempVendorCDR_20' ) start [2025-03-02 12:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591146', 'tblTempVendorCDR_20' ) end [2025-03-02 12:31:17] Production.INFO: ProcessCDR(1,14591146,1,1,2) [2025-03-02 12:31:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591146,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:31:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591146,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:31:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591146,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:31:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591146,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:31:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591146', 'tblTempUsageDetail_20' ) start [2025-03-02 12:31:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591146', 'tblTempUsageDetail_20' ) end [2025-03-02 12:31:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:31:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:31:22] Production.INFO: ==14882== Releasing lock... [2025-03-02 12:31:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:31:22] Production.INFO: 35.25 MB #Memory Used# [2025-03-02 12:32:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:32:05 [end_date_ymd] => 2025-03-02 12:32:05 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:32:05' and `end` < '2025-03-02 12: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-03-02 12:32:17] Production.INFO: count ==892 [2025-03-02 12:32:18] Production.ERROR: pbx CDR StartTime 2025-03-02 09:32:05 - End Time 2025-03-02 12:32:05 [2025-03-02 12:32:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:32:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591151', 'tblTempUsageDetail_20' ) start [2025-03-02 12:32:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591151', 'tblTempUsageDetail_20' ) end [2025-03-02 12:32:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591151', 'tblTempVendorCDR_20' ) start [2025-03-02 12:32:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591151', 'tblTempVendorCDR_20' ) end [2025-03-02 12:32:18] Production.INFO: ProcessCDR(1,14591151,1,1,2) [2025-03-02 12:32:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591151,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:32:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591151,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:32:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591151,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:32:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591151,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:32:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591151', 'tblTempUsageDetail_20' ) start [2025-03-02 12:32:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591151', 'tblTempUsageDetail_20' ) end [2025-03-02 12:32:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:32:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:32:21] Production.INFO: ==14965== Releasing lock... [2025-03-02 12:32:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:32:21] Production.INFO: 35.25 MB #Memory Used# [2025-03-02 12:33:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:33:05 [end_date_ymd] => 2025-03-02 12:33:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 09:33:05' and `end` < '2025-03-02 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-03-02 12:33:17] Production.INFO: count ==891 [2025-03-02 12:33:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:33:05 - End Time 2025-03-02 12:33:05 [2025-03-02 12:33:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591156', 'tblTempUsageDetail_20' ) start [2025-03-02 12:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591156', 'tblTempUsageDetail_20' ) end [2025-03-02 12:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591156', 'tblTempVendorCDR_20' ) start [2025-03-02 12:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591156', 'tblTempVendorCDR_20' ) end [2025-03-02 12:33:17] Production.INFO: ProcessCDR(1,14591156,1,1,2) [2025-03-02 12:33:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591156,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:33:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591156,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:33:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591156,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:33:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591156,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:33:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591156', 'tblTempUsageDetail_20' ) start [2025-03-02 12:33:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591156', 'tblTempUsageDetail_20' ) end [2025-03-02 12:33:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:33:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:33:21] Production.INFO: ==15048== Releasing lock... [2025-03-02 12:33:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:33:21] Production.INFO: 34.5 MB #Memory Used# [2025-03-02 12:34:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:34:06 [end_date_ymd] => 2025-03-02 12:34:06 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:34:06' and `end` < '2025-03-02 12: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-03-02 12:34:18] Production.INFO: count ==901 [2025-03-02 12:34:18] Production.ERROR: pbx CDR StartTime 2025-03-02 09:34:06 - End Time 2025-03-02 12:34:06 [2025-03-02 12:34:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591161', 'tblTempUsageDetail_20' ) start [2025-03-02 12:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591161', 'tblTempUsageDetail_20' ) end [2025-03-02 12:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591161', 'tblTempVendorCDR_20' ) start [2025-03-02 12:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591161', 'tblTempVendorCDR_20' ) end [2025-03-02 12:34:18] Production.INFO: ProcessCDR(1,14591161,1,1,2) [2025-03-02 12:34:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591161,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:34:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591161,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:34:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591161,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:34:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591161,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:34:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591161', 'tblTempUsageDetail_20' ) start [2025-03-02 12:34:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591161', 'tblTempUsageDetail_20' ) end [2025-03-02 12:34:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:34:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:34:22] Production.INFO: ==15129== Releasing lock... [2025-03-02 12:34:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:34:22] Production.INFO: 34.75 MB #Memory Used# [2025-03-02 12:35:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:35:05 [end_date_ymd] => 2025-03-02 12:35:05 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:35:05' and `end` < '2025-03-02 12: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-03-02 12:35:17] Production.INFO: count ==915 [2025-03-02 12:35:18] Production.ERROR: pbx CDR StartTime 2025-03-02 09:35:05 - End Time 2025-03-02 12:35:05 [2025-03-02 12:35:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591166', 'tblTempUsageDetail_20' ) start [2025-03-02 12:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591166', 'tblTempUsageDetail_20' ) end [2025-03-02 12:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591166', 'tblTempVendorCDR_20' ) start [2025-03-02 12:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591166', 'tblTempVendorCDR_20' ) end [2025-03-02 12:35:18] Production.INFO: ProcessCDR(1,14591166,1,1,2) [2025-03-02 12:35:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591166,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:35:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591166,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:35:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591166,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:35:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591166,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:35:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591166', 'tblTempUsageDetail_20' ) start [2025-03-02 12:35:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591166', 'tblTempUsageDetail_20' ) end [2025-03-02 12:35:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:35:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:35:21] Production.INFO: ==15202== Releasing lock... [2025-03-02 12:35:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:35:21] Production.INFO: 35.25 MB #Memory Used# [2025-03-02 12:36:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:36:06 [end_date_ymd] => 2025-03-02 12:36:06 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:36:06' and `end` < '2025-03-02 12: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-03-02 12:36:18] Production.INFO: count ==918 [2025-03-02 12:36:18] Production.ERROR: pbx CDR StartTime 2025-03-02 09:36:06 - End Time 2025-03-02 12:36:06 [2025-03-02 12:36:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:36:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591171', 'tblTempUsageDetail_20' ) start [2025-03-02 12:36:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591171', 'tblTempUsageDetail_20' ) end [2025-03-02 12:36:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591171', 'tblTempVendorCDR_20' ) start [2025-03-02 12:36:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591171', 'tblTempVendorCDR_20' ) end [2025-03-02 12:36:18] Production.INFO: ProcessCDR(1,14591171,1,1,2) [2025-03-02 12:36:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591171,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:36:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591171,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:36:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591171,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:36:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591171,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:36:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591171', 'tblTempUsageDetail_20' ) start [2025-03-02 12:36:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591171', 'tblTempUsageDetail_20' ) end [2025-03-02 12:36:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:36:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:36:23] Production.INFO: ==15277== Releasing lock... [2025-03-02 12:36:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:36:23] Production.INFO: 34.75 MB #Memory Used# [2025-03-02 12:37:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:37:05 [end_date_ymd] => 2025-03-02 12:37:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 09:37:05' and `end` < '2025-03-02 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-03-02 12:37:17] Production.INFO: count ==920 [2025-03-02 12:37:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:37:05 - End Time 2025-03-02 12:37:05 [2025-03-02 12:37:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591176', 'tblTempUsageDetail_20' ) start [2025-03-02 12:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591176', 'tblTempUsageDetail_20' ) end [2025-03-02 12:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591176', 'tblTempVendorCDR_20' ) start [2025-03-02 12:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591176', 'tblTempVendorCDR_20' ) end [2025-03-02 12:37:17] Production.INFO: ProcessCDR(1,14591176,1,1,2) [2025-03-02 12:37:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591176,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:37:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591176,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:37:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591176,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:37:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591176,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:37:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591176', 'tblTempUsageDetail_20' ) start [2025-03-02 12:37:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591176', 'tblTempUsageDetail_20' ) end [2025-03-02 12:37:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:37:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:37:22] Production.INFO: ==15347== Releasing lock... [2025-03-02 12:37:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:37:22] Production.INFO: 34.75 MB #Memory Used# [2025-03-02 12:38:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:38:06 [end_date_ymd] => 2025-03-02 12:38:06 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:38:06' and `end` < '2025-03-02 12: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-03-02 12:38:18] Production.INFO: count ==931 [2025-03-02 12:38:18] Production.ERROR: pbx CDR StartTime 2025-03-02 09:38:06 - End Time 2025-03-02 12:38:06 [2025-03-02 12:38:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591181', 'tblTempUsageDetail_20' ) start [2025-03-02 12:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591181', 'tblTempUsageDetail_20' ) end [2025-03-02 12:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591181', 'tblTempVendorCDR_20' ) start [2025-03-02 12:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591181', 'tblTempVendorCDR_20' ) end [2025-03-02 12:38:18] Production.INFO: ProcessCDR(1,14591181,1,1,2) [2025-03-02 12:38:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591181,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:38:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591181,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:38:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591181,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:38:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591181,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:38:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591181', 'tblTempUsageDetail_20' ) start [2025-03-02 12:38:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591181', 'tblTempUsageDetail_20' ) end [2025-03-02 12:38:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:38:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:38:23] Production.INFO: ==15418== Releasing lock... [2025-03-02 12:38:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:38:23] Production.INFO: 35.5 MB #Memory Used# [2025-03-02 12:39:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:39:05 [end_date_ymd] => 2025-03-02 12:39:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 09:39:05' and `end` < '2025-03-02 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-03-02 12:39:17] Production.INFO: count ==934 [2025-03-02 12:39:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:39:05 - End Time 2025-03-02 12:39:05 [2025-03-02 12:39:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591186', 'tblTempUsageDetail_20' ) start [2025-03-02 12:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591186', 'tblTempUsageDetail_20' ) end [2025-03-02 12:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591186', 'tblTempVendorCDR_20' ) start [2025-03-02 12:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591186', 'tblTempVendorCDR_20' ) end [2025-03-02 12:39:17] Production.INFO: ProcessCDR(1,14591186,1,1,2) [2025-03-02 12:39:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591186,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:39:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591186,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:39:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591186,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:39:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591186,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:39:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591186', 'tblTempUsageDetail_20' ) start [2025-03-02 12:39:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591186', 'tblTempUsageDetail_20' ) end [2025-03-02 12:39:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:39:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:39:22] Production.INFO: ==15489== Releasing lock... [2025-03-02 12:39:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:39:22] Production.INFO: 35.25 MB #Memory Used# [2025-03-02 12:40:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:40:06 [end_date_ymd] => 2025-03-02 12:40:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 09:40:06' and `end` < '2025-03-02 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-03-02 12:40:18] Production.INFO: count ==939 [2025-03-02 12:40:18] Production.ERROR: pbx CDR StartTime 2025-03-02 09:40:06 - End Time 2025-03-02 12:40:06 [2025-03-02 12:40:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591191', 'tblTempUsageDetail_20' ) start [2025-03-02 12:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591191', 'tblTempUsageDetail_20' ) end [2025-03-02 12:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591191', 'tblTempVendorCDR_20' ) start [2025-03-02 12:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591191', 'tblTempVendorCDR_20' ) end [2025-03-02 12:40:18] Production.INFO: ProcessCDR(1,14591191,1,1,2) [2025-03-02 12:40:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591191,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:40:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591191,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:40:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591191,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:40:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591191,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:40:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591191', 'tblTempUsageDetail_20' ) start [2025-03-02 12:40:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591191', 'tblTempUsageDetail_20' ) end [2025-03-02 12:40:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:40:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:40:23] Production.INFO: ==15561== Releasing lock... [2025-03-02 12:40:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:40:23] Production.INFO: 35.25 MB #Memory Used# [2025-03-02 12:41:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:41:05 [end_date_ymd] => 2025-03-02 12:41:05 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:41:05' and `end` < '2025-03-02 12: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-03-02 12:41:17] Production.INFO: count ==972 [2025-03-02 12:41:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:41:05 - End Time 2025-03-02 12:41:05 [2025-03-02 12:41:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591197', 'tblTempUsageDetail_20' ) start [2025-03-02 12:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591197', 'tblTempUsageDetail_20' ) end [2025-03-02 12:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591197', 'tblTempVendorCDR_20' ) start [2025-03-02 12:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591197', 'tblTempVendorCDR_20' ) end [2025-03-02 12:41:17] Production.INFO: ProcessCDR(1,14591197,1,1,2) [2025-03-02 12:41:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591197,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:41:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591197,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:41:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591197,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:41:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591197,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:41:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591197', 'tblTempUsageDetail_20' ) start [2025-03-02 12:41:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591197', 'tblTempUsageDetail_20' ) end [2025-03-02 12:41:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:41:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:41:22] Production.INFO: ==15635== Releasing lock... [2025-03-02 12:41:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:41:22] Production.INFO: 35.5 MB #Memory Used# [2025-03-02 12:42:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:42:06 [end_date_ymd] => 2025-03-02 12:42:06 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:42:06' and `end` < '2025-03-02 12: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-03-02 12:42:18] Production.INFO: count ==970 [2025-03-02 12:42:18] Production.ERROR: pbx CDR StartTime 2025-03-02 09:42:06 - End Time 2025-03-02 12:42:06 [2025-03-02 12:42:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591202', 'tblTempUsageDetail_20' ) start [2025-03-02 12:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591202', 'tblTempUsageDetail_20' ) end [2025-03-02 12:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591202', 'tblTempVendorCDR_20' ) start [2025-03-02 12:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591202', 'tblTempVendorCDR_20' ) end [2025-03-02 12:42:18] Production.INFO: ProcessCDR(1,14591202,1,1,2) [2025-03-02 12:42:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591202,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:42:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591202,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:42:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591202,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:42:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591202,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:42:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591202', 'tblTempUsageDetail_20' ) start [2025-03-02 12:42:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591202', 'tblTempUsageDetail_20' ) end [2025-03-02 12:42:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:42:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:42:22] Production.INFO: ==15718== Releasing lock... [2025-03-02 12:42:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:42:22] Production.INFO: 35.5 MB #Memory Used# [2025-03-02 12:43:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:43:05 [end_date_ymd] => 2025-03-02 12:43:05 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:43:05' and `end` < '2025-03-02 12: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-03-02 12:43:17] Production.INFO: count ==970 [2025-03-02 12:43:18] Production.ERROR: pbx CDR StartTime 2025-03-02 09:43:05 - End Time 2025-03-02 12:43:05 [2025-03-02 12:43:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591207', 'tblTempUsageDetail_20' ) start [2025-03-02 12:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591207', 'tblTempUsageDetail_20' ) end [2025-03-02 12:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591207', 'tblTempVendorCDR_20' ) start [2025-03-02 12:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591207', 'tblTempVendorCDR_20' ) end [2025-03-02 12:43:18] Production.INFO: ProcessCDR(1,14591207,1,1,2) [2025-03-02 12:43:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591207,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:43:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591207,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:43:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591207,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:43:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591207,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:43:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591207', 'tblTempUsageDetail_20' ) start [2025-03-02 12:43:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591207', 'tblTempUsageDetail_20' ) end [2025-03-02 12:43:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:43:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:43:21] Production.INFO: ==15795== Releasing lock... [2025-03-02 12:43:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:43:21] Production.INFO: 35.5 MB #Memory Used# [2025-03-02 12:44:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:44:06 [end_date_ymd] => 2025-03-02 12:44:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 09:44:06' and `end` < '2025-03-02 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-03-02 12:44:18] Production.INFO: count ==971 [2025-03-02 12:44:18] Production.ERROR: pbx CDR StartTime 2025-03-02 09:44:06 - End Time 2025-03-02 12:44:06 [2025-03-02 12:44:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591212', 'tblTempUsageDetail_20' ) start [2025-03-02 12:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591212', 'tblTempUsageDetail_20' ) end [2025-03-02 12:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591212', 'tblTempVendorCDR_20' ) start [2025-03-02 12:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591212', 'tblTempVendorCDR_20' ) end [2025-03-02 12:44:18] Production.INFO: ProcessCDR(1,14591212,1,1,2) [2025-03-02 12:44:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591212,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:44:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591212,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:44:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591212,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:44:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591212,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:44:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591212', 'tblTempUsageDetail_20' ) start [2025-03-02 12:44:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591212', 'tblTempUsageDetail_20' ) end [2025-03-02 12:44:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:44:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:44:23] Production.INFO: ==15866== Releasing lock... [2025-03-02 12:44:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:44:23] Production.INFO: 35.75 MB #Memory Used# [2025-03-02 12:45:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:45:05 [end_date_ymd] => 2025-03-02 12:45:05 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:45:05' and `end` < '2025-03-02 12: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-03-02 12:45:17] Production.INFO: count ==971 [2025-03-02 12:45:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:45:05 - End Time 2025-03-02 12:45:05 [2025-03-02 12:45:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591217', 'tblTempUsageDetail_20' ) start [2025-03-02 12:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591217', 'tblTempUsageDetail_20' ) end [2025-03-02 12:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591217', 'tblTempVendorCDR_20' ) start [2025-03-02 12:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591217', 'tblTempVendorCDR_20' ) end [2025-03-02 12:45:17] Production.INFO: ProcessCDR(1,14591217,1,1,2) [2025-03-02 12:45:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591217,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:45:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591217,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:45:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591217,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:45:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591217,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:45:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591217', 'tblTempUsageDetail_20' ) start [2025-03-02 12:45:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591217', 'tblTempUsageDetail_20' ) end [2025-03-02 12:45:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:45:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:45:20] Production.INFO: ==15937== Releasing lock... [2025-03-02 12:45:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:45:20] Production.INFO: 35.75 MB #Memory Used# [2025-03-02 12:46:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:46:06 [end_date_ymd] => 2025-03-02 12:46:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 09:46:06' and `end` < '2025-03-02 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-03-02 12:46:18] Production.INFO: count ==971 [2025-03-02 12:46:18] Production.ERROR: pbx CDR StartTime 2025-03-02 09:46:06 - End Time 2025-03-02 12:46:06 [2025-03-02 12:46:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591222', 'tblTempUsageDetail_20' ) start [2025-03-02 12:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591222', 'tblTempUsageDetail_20' ) end [2025-03-02 12:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591222', 'tblTempVendorCDR_20' ) start [2025-03-02 12:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591222', 'tblTempVendorCDR_20' ) end [2025-03-02 12:46:18] Production.INFO: ProcessCDR(1,14591222,1,1,2) [2025-03-02 12:46:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591222,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:46:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591222,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:46:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591222,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:46:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591222,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591222', 'tblTempUsageDetail_20' ) start [2025-03-02 12:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591222', 'tblTempUsageDetail_20' ) end [2025-03-02 12:46:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:46:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:46:21] Production.INFO: ==16051== Releasing lock... [2025-03-02 12:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:46:21] Production.INFO: 35.75 MB #Memory Used# [2025-03-02 12:47:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:47:05 [end_date_ymd] => 2025-03-02 12:47:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 09:47:05' and `end` < '2025-03-02 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-03-02 12:47:17] Production.INFO: count ==974 [2025-03-02 12:47:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:47:05 - End Time 2025-03-02 12:47:05 [2025-03-02 12:47:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591227', 'tblTempUsageDetail_20' ) start [2025-03-02 12:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591227', 'tblTempUsageDetail_20' ) end [2025-03-02 12:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591227', 'tblTempVendorCDR_20' ) start [2025-03-02 12:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591227', 'tblTempVendorCDR_20' ) end [2025-03-02 12:47:17] Production.INFO: ProcessCDR(1,14591227,1,1,2) [2025-03-02 12:47:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591227,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:47:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591227,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:47:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591227,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:47:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591227,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:47:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591227', 'tblTempUsageDetail_20' ) start [2025-03-02 12:47:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591227', 'tblTempUsageDetail_20' ) end [2025-03-02 12:47:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:47:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:47:21] Production.INFO: ==16135== Releasing lock... [2025-03-02 12:47:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:47:21] Production.INFO: 35.5 MB #Memory Used# [2025-03-02 12:48:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:48:05 [end_date_ymd] => 2025-03-02 12:48:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 09:48:05' and `end` < '2025-03-02 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-03-02 12:48:17] Production.INFO: count ==976 [2025-03-02 12:48:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:48:05 - End Time 2025-03-02 12:48:05 [2025-03-02 12:48:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591232', 'tblTempUsageDetail_20' ) start [2025-03-02 12:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591232', 'tblTempUsageDetail_20' ) end [2025-03-02 12:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591232', 'tblTempVendorCDR_20' ) start [2025-03-02 12:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591232', 'tblTempVendorCDR_20' ) end [2025-03-02 12:48:18] Production.INFO: ProcessCDR(1,14591232,1,1,2) [2025-03-02 12:48:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591232,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:48:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591232,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:48:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591232,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:48:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591232,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:48:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591232', 'tblTempUsageDetail_20' ) start [2025-03-02 12:48:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591232', 'tblTempUsageDetail_20' ) end [2025-03-02 12:48:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:48:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:48:22] Production.INFO: ==16221== Releasing lock... [2025-03-02 12:48:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:48:22] Production.INFO: 35.75 MB #Memory Used# [2025-03-02 12:49:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:49:05 [end_date_ymd] => 2025-03-02 12:49:05 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:49:05' and `end` < '2025-03-02 12: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-03-02 12:49:17] Production.INFO: count ==979 [2025-03-02 12:49:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:49:05 - End Time 2025-03-02 12:49:05 [2025-03-02 12:49:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591236', 'tblTempUsageDetail_20' ) start [2025-03-02 12:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591236', 'tblTempUsageDetail_20' ) end [2025-03-02 12:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591236', 'tblTempVendorCDR_20' ) start [2025-03-02 12:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591236', 'tblTempVendorCDR_20' ) end [2025-03-02 12:49:17] Production.INFO: ProcessCDR(1,14591236,1,1,2) [2025-03-02 12:49:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591236,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:49:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591236,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:49:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591236,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:49:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591236,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:49:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591236', 'tblTempUsageDetail_20' ) start [2025-03-02 12:49:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591236', 'tblTempUsageDetail_20' ) end [2025-03-02 12:49:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:49:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:49:22] Production.INFO: ==16310== Releasing lock... [2025-03-02 12:49:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:49:22] Production.INFO: 35.75 MB #Memory Used# [2025-03-02 12:50:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:50:06 [end_date_ymd] => 2025-03-02 12:50:06 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:50:06' and `end` < '2025-03-02 12: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-03-02 12:50:18] Production.INFO: count ==982 [2025-03-02 12:50:19] Production.ERROR: pbx CDR StartTime 2025-03-02 09:50:06 - End Time 2025-03-02 12:50:06 [2025-03-02 12:50:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591242', 'tblTempUsageDetail_20' ) start [2025-03-02 12:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591242', 'tblTempUsageDetail_20' ) end [2025-03-02 12:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591242', 'tblTempVendorCDR_20' ) start [2025-03-02 12:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591242', 'tblTempVendorCDR_20' ) end [2025-03-02 12:50:19] Production.INFO: ProcessCDR(1,14591242,1,1,2) [2025-03-02 12:50:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591242,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:50:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591242,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:50:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591242,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:50:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591242,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:50:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591242', 'tblTempUsageDetail_20' ) start [2025-03-02 12:50:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591242', 'tblTempUsageDetail_20' ) end [2025-03-02 12:50:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:50:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:50:23] Production.INFO: ==16383== Releasing lock... [2025-03-02 12:50:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:50:23] Production.INFO: 36 MB #Memory Used# [2025-03-02 12:51:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:51:05 [end_date_ymd] => 2025-03-02 12:51:05 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:51:05' and `end` < '2025-03-02 12: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-03-02 12:51:17] Production.INFO: count ==999 [2025-03-02 12:51:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:51:05 - End Time 2025-03-02 12:51:05 [2025-03-02 12:51:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591248', 'tblTempUsageDetail_20' ) start [2025-03-02 12:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591248', 'tblTempUsageDetail_20' ) end [2025-03-02 12:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591248', 'tblTempVendorCDR_20' ) start [2025-03-02 12:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591248', 'tblTempVendorCDR_20' ) end [2025-03-02 12:51:17] Production.INFO: ProcessCDR(1,14591248,1,1,2) [2025-03-02 12:51:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591248,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:51:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591248,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:51:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591248,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:51:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591248,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:51:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591248', 'tblTempUsageDetail_20' ) start [2025-03-02 12:51:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591248', 'tblTempUsageDetail_20' ) end [2025-03-02 12:51:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:51:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:51:22] Production.INFO: ==16466== Releasing lock... [2025-03-02 12:51:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:51:22] Production.INFO: 36.25 MB #Memory Used# [2025-03-02 12:52:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:52:05 [end_date_ymd] => 2025-03-02 12:52:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 09:52:05' and `end` < '2025-03-02 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-03-02 12:52:17] Production.INFO: count ==1005 [2025-03-02 12:52:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:52:05 - End Time 2025-03-02 12:52:05 [2025-03-02 12:52:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591253', 'tblTempUsageDetail_20' ) start [2025-03-02 12:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591253', 'tblTempUsageDetail_20' ) end [2025-03-02 12:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591253', 'tblTempVendorCDR_20' ) start [2025-03-02 12:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591253', 'tblTempVendorCDR_20' ) end [2025-03-02 12:52:17] Production.INFO: ProcessCDR(1,14591253,1,1,2) [2025-03-02 12:52:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591253,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:52:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591253,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:52:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591253,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:52:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591253,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:52:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591253', 'tblTempUsageDetail_20' ) start [2025-03-02 12:52:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591253', 'tblTempUsageDetail_20' ) end [2025-03-02 12:52:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:52:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:52:21] Production.INFO: ==16543== Releasing lock... [2025-03-02 12:52:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:52:21] Production.INFO: 36 MB #Memory Used# [2025-03-02 12:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:53:05 [end_date_ymd] => 2025-03-02 12:53:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 09:53:05' and `end` < '2025-03-02 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-03-02 12:53:17] Production.INFO: count ==1008 [2025-03-02 12:53:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:53:05 - End Time 2025-03-02 12:53:05 [2025-03-02 12:53:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591258', 'tblTempUsageDetail_20' ) start [2025-03-02 12:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591258', 'tblTempUsageDetail_20' ) end [2025-03-02 12:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591258', 'tblTempVendorCDR_20' ) start [2025-03-02 12:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591258', 'tblTempVendorCDR_20' ) end [2025-03-02 12:53:17] Production.INFO: ProcessCDR(1,14591258,1,1,2) [2025-03-02 12:53:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591258,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:53:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591258,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:53:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591258,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:53:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591258,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591258', 'tblTempUsageDetail_20' ) start [2025-03-02 12:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591258', 'tblTempUsageDetail_20' ) end [2025-03-02 12:53:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:53:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:53:21] Production.INFO: ==16619== Releasing lock... [2025-03-02 12:53:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:53:21] Production.INFO: 35.5 MB #Memory Used# [2025-03-02 12:54:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:54:06 [end_date_ymd] => 2025-03-02 12:54:06 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:54:06' and `end` < '2025-03-02 12: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-03-02 12:54:17] Production.INFO: count ==1008 [2025-03-02 12:54:18] Production.ERROR: pbx CDR StartTime 2025-03-02 09:54:06 - End Time 2025-03-02 12:54:06 [2025-03-02 12:54:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591263', 'tblTempUsageDetail_20' ) start [2025-03-02 12:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591263', 'tblTempUsageDetail_20' ) end [2025-03-02 12:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591263', 'tblTempVendorCDR_20' ) start [2025-03-02 12:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591263', 'tblTempVendorCDR_20' ) end [2025-03-02 12:54:18] Production.INFO: ProcessCDR(1,14591263,1,1,2) [2025-03-02 12:54:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591263,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:54:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591263,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:54:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591263,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:54:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591263,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:54:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591263', 'tblTempUsageDetail_20' ) start [2025-03-02 12:54:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591263', 'tblTempUsageDetail_20' ) end [2025-03-02 12:54:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:54:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:54:21] Production.INFO: ==16700== Releasing lock... [2025-03-02 12:54:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:54:21] Production.INFO: 35.5 MB #Memory Used# [2025-03-02 12:55:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:55:05 [end_date_ymd] => 2025-03-02 12:55:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 09:55:05' and `end` < '2025-03-02 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-03-02 12:55:17] Production.INFO: count ==1008 [2025-03-02 12:55:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:55:05 - End Time 2025-03-02 12:55:05 [2025-03-02 12:55:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591268', 'tblTempUsageDetail_20' ) start [2025-03-02 12:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591268', 'tblTempUsageDetail_20' ) end [2025-03-02 12:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591268', 'tblTempVendorCDR_20' ) start [2025-03-02 12:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591268', 'tblTempVendorCDR_20' ) end [2025-03-02 12:55:17] Production.INFO: ProcessCDR(1,14591268,1,1,2) [2025-03-02 12:55:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591268,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:55:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591268,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:55:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591268,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:55:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591268,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:55:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591268', 'tblTempUsageDetail_20' ) start [2025-03-02 12:55:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591268', 'tblTempUsageDetail_20' ) end [2025-03-02 12:55:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:55:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:55:20] Production.INFO: ==16781== Releasing lock... [2025-03-02 12:55:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:55:20] Production.INFO: 35.5 MB #Memory Used# [2025-03-02 12:56:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:56:05 [end_date_ymd] => 2025-03-02 12:56:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 09:56:05' and `end` < '2025-03-02 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-03-02 12:56:17] Production.INFO: count ==999 [2025-03-02 12:56:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:56:05 - End Time 2025-03-02 12:56:05 [2025-03-02 12:56:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591273', 'tblTempUsageDetail_20' ) start [2025-03-02 12:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591273', 'tblTempUsageDetail_20' ) end [2025-03-02 12:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591273', 'tblTempVendorCDR_20' ) start [2025-03-02 12:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591273', 'tblTempVendorCDR_20' ) end [2025-03-02 12:56:17] Production.INFO: ProcessCDR(1,14591273,1,1,2) [2025-03-02 12:56:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591273,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:56:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591273,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:56:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591273,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:56:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591273,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:56:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591273', 'tblTempUsageDetail_20' ) start [2025-03-02 12:56:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591273', 'tblTempUsageDetail_20' ) end [2025-03-02 12:56:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:56:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:56:20] Production.INFO: ==16854== Releasing lock... [2025-03-02 12:56:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:56:20] Production.INFO: 36.25 MB #Memory Used# [2025-03-02 12:57:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:57:05 [end_date_ymd] => 2025-03-02 12:57:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 09:57:05' and `end` < '2025-03-02 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-03-02 12:57:17] Production.INFO: count ==999 [2025-03-02 12:57:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:57:05 - End Time 2025-03-02 12:57:05 [2025-03-02 12:57:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591278', 'tblTempUsageDetail_20' ) start [2025-03-02 12:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591278', 'tblTempUsageDetail_20' ) end [2025-03-02 12:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591278', 'tblTempVendorCDR_20' ) start [2025-03-02 12:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591278', 'tblTempVendorCDR_20' ) end [2025-03-02 12:57:17] Production.INFO: ProcessCDR(1,14591278,1,1,2) [2025-03-02 12:57:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591278,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:57:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591278,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:57:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591278,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:57:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591278,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:57:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591278', 'tblTempUsageDetail_20' ) start [2025-03-02 12:57:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591278', 'tblTempUsageDetail_20' ) end [2025-03-02 12:57:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:57:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:57:20] Production.INFO: ==16928== Releasing lock... [2025-03-02 12:57:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:57:20] Production.INFO: 36.25 MB #Memory Used# [2025-03-02 12:58:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:58:05 [end_date_ymd] => 2025-03-02 12:58:05 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:58:05' and `end` < '2025-03-02 12: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-03-02 12:58:17] Production.INFO: count ==999 [2025-03-02 12:58:17] Production.ERROR: pbx CDR StartTime 2025-03-02 09:58:05 - End Time 2025-03-02 12:58:05 [2025-03-02 12:58:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591283', 'tblTempUsageDetail_20' ) start [2025-03-02 12:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591283', 'tblTempUsageDetail_20' ) end [2025-03-02 12:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591283', 'tblTempVendorCDR_20' ) start [2025-03-02 12:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591283', 'tblTempVendorCDR_20' ) end [2025-03-02 12:58:17] Production.INFO: ProcessCDR(1,14591283,1,1,2) [2025-03-02 12:58:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591283,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:58:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591283,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:58:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591283,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:58:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591283,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:58:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591283', 'tblTempUsageDetail_20' ) start [2025-03-02 12:58:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591283', 'tblTempUsageDetail_20' ) end [2025-03-02 12:58:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:58:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:58:20] Production.INFO: ==17003== Releasing lock... [2025-03-02 12:58:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:58:20] Production.INFO: 36.25 MB #Memory Used# [2025-03-02 12:59:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 09:59:06 [end_date_ymd] => 2025-03-02 12:59:06 [RateCDR] => 1 ) [2025-03-02 12: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-03-02 09:59:06' and `end` < '2025-03-02 12: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-03-02 12:59:18] Production.INFO: count ==1001 [2025-03-02 12:59:18] Production.ERROR: pbx CDR StartTime 2025-03-02 09:59:06 - End Time 2025-03-02 12:59:06 [2025-03-02 12:59:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 12:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591288', 'tblTempUsageDetail_20' ) start [2025-03-02 12:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591288', 'tblTempUsageDetail_20' ) end [2025-03-02 12:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591288', 'tblTempVendorCDR_20' ) start [2025-03-02 12:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591288', 'tblTempVendorCDR_20' ) end [2025-03-02 12:59:18] Production.INFO: ProcessCDR(1,14591288,1,1,2) [2025-03-02 12:59:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591288,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:59:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591288,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 12:59:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591288,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:59:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591288,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 12:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591288', 'tblTempUsageDetail_20' ) start [2025-03-02 12:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591288', 'tblTempUsageDetail_20' ) end [2025-03-02 12:59:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 12:59:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 12:59:21] Production.INFO: ==17085== Releasing lock... [2025-03-02 12:59:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 12:59:21] Production.INFO: 36 MB #Memory Used# [2025-03-02 13:00:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:00:06 [end_date_ymd] => 2025-03-02 13:00:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:00:06' and `end` < '2025-03-02 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-03-02 13:00:18] Production.INFO: count ==1005 [2025-03-02 13:00:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:00:06 - End Time 2025-03-02 13:00:06 [2025-03-02 13:00:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591294', 'tblTempUsageDetail_20' ) start [2025-03-02 13:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591294', 'tblTempUsageDetail_20' ) end [2025-03-02 13:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591294', 'tblTempVendorCDR_20' ) start [2025-03-02 13:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591294', 'tblTempVendorCDR_20' ) end [2025-03-02 13:00:18] Production.INFO: ProcessCDR(1,14591294,1,1,2) [2025-03-02 13:00:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591294,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:00:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591294,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:00:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591294,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:00:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591294,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:00:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591294', 'tblTempUsageDetail_20' ) start [2025-03-02 13:00:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591294', 'tblTempUsageDetail_20' ) end [2025-03-02 13:00:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:00:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:00:22] Production.INFO: ==17168== Releasing lock... [2025-03-02 13:00:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:00:22] Production.INFO: 35.75 MB #Memory Used# [2025-03-02 13:01:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:01:05 [end_date_ymd] => 2025-03-02 13:01:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:01:05' and `end` < '2025-03-02 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-03-02 13:01:18] Production.INFO: count ==1009 [2025-03-02 13:01:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:01:05 - End Time 2025-03-02 13:01:05 [2025-03-02 13:01:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591299', 'tblTempUsageDetail_20' ) start [2025-03-02 13:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591299', 'tblTempUsageDetail_20' ) end [2025-03-02 13:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591299', 'tblTempVendorCDR_20' ) start [2025-03-02 13:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591299', 'tblTempVendorCDR_20' ) end [2025-03-02 13:01:18] Production.INFO: ProcessCDR(1,14591299,1,1,2) [2025-03-02 13:01:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591299,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:01:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591299,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:01:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591299,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:01:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591299,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591299', 'tblTempUsageDetail_20' ) start [2025-03-02 13:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591299', 'tblTempUsageDetail_20' ) end [2025-03-02 13:01:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:01:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:01:21] Production.INFO: ==17315== Releasing lock... [2025-03-02 13:01:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:01:21] Production.INFO: 35.75 MB #Memory Used# [2025-03-02 13:02:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:02:05 [end_date_ymd] => 2025-03-02 13:02:05 [RateCDR] => 1 ) [2025-03-02 13: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-03-02 10:02:05' and `end` < '2025-03-02 13: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-03-02 13:02:17] Production.INFO: count ==1008 [2025-03-02 13:02:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:02:05 - End Time 2025-03-02 13:02:05 [2025-03-02 13:02:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591304', 'tblTempUsageDetail_20' ) start [2025-03-02 13:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591304', 'tblTempUsageDetail_20' ) end [2025-03-02 13:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591304', 'tblTempVendorCDR_20' ) start [2025-03-02 13:02:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591304', 'tblTempVendorCDR_20' ) end [2025-03-02 13:02:18] Production.INFO: ProcessCDR(1,14591304,1,1,2) [2025-03-02 13:02:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591304,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:02:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591304,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:02:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591304,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:02:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591304,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:02:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591304', 'tblTempUsageDetail_20' ) start [2025-03-02 13:02:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591304', 'tblTempUsageDetail_20' ) end [2025-03-02 13:02:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:02:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:02:21] Production.INFO: ==17393== Releasing lock... [2025-03-02 13:02:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:02:21] Production.INFO: 35.75 MB #Memory Used# [2025-03-02 13:03:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:03:06 [end_date_ymd] => 2025-03-02 13:03:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:03:06' and `end` < '2025-03-02 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-03-02 13:03:18] Production.INFO: count ==1015 [2025-03-02 13:03:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:03:06 - End Time 2025-03-02 13:03:06 [2025-03-02 13:03:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591309', 'tblTempUsageDetail_20' ) start [2025-03-02 13:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591309', 'tblTempUsageDetail_20' ) end [2025-03-02 13:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591309', 'tblTempVendorCDR_20' ) start [2025-03-02 13:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591309', 'tblTempVendorCDR_20' ) end [2025-03-02 13:03:18] Production.INFO: ProcessCDR(1,14591309,1,1,2) [2025-03-02 13:03:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591309,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:03:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591309,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:03:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591309,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:03:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591309,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:03:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591309', 'tblTempUsageDetail_20' ) start [2025-03-02 13:03:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591309', 'tblTempUsageDetail_20' ) end [2025-03-02 13:03:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:03:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:03:22] Production.INFO: ==17463== Releasing lock... [2025-03-02 13:03:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:03:22] Production.INFO: 36.5 MB #Memory Used# [2025-03-02 13:04:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:04:06 [end_date_ymd] => 2025-03-02 13:04:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:04:06' and `end` < '2025-03-02 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-03-02 13:04:18] Production.INFO: count ==1014 [2025-03-02 13:04:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:04:06 - End Time 2025-03-02 13:04:06 [2025-03-02 13:04:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:04:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591314', 'tblTempUsageDetail_20' ) start [2025-03-02 13:04:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591314', 'tblTempUsageDetail_20' ) end [2025-03-02 13:04:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591314', 'tblTempVendorCDR_20' ) start [2025-03-02 13:04:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591314', 'tblTempVendorCDR_20' ) end [2025-03-02 13:04:18] Production.INFO: ProcessCDR(1,14591314,1,1,2) [2025-03-02 13:04:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591314,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:04:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591314,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:04:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591314,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:04:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591314,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:04:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591314', 'tblTempUsageDetail_20' ) start [2025-03-02 13:04:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591314', 'tblTempUsageDetail_20' ) end [2025-03-02 13:04:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:04:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:04:22] Production.INFO: ==17535== Releasing lock... [2025-03-02 13:04:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:04:22] Production.INFO: 36.25 MB #Memory Used# [2025-03-02 13:05:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:05:06 [end_date_ymd] => 2025-03-02 13:05:06 [RateCDR] => 1 ) [2025-03-02 13: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-03-02 10:05:06' and `end` < '2025-03-02 13: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-03-02 13:05:18] Production.INFO: count ==1002 [2025-03-02 13:05:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:05:06 - End Time 2025-03-02 13:05:06 [2025-03-02 13:05:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591319', 'tblTempUsageDetail_20' ) start [2025-03-02 13:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591319', 'tblTempUsageDetail_20' ) end [2025-03-02 13:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591319', 'tblTempVendorCDR_20' ) start [2025-03-02 13:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591319', 'tblTempVendorCDR_20' ) end [2025-03-02 13:05:18] Production.INFO: ProcessCDR(1,14591319,1,1,2) [2025-03-02 13:05:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591319,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:05:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591319,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:05:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591319,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:05:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591319,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:05:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591319', 'tblTempUsageDetail_20' ) start [2025-03-02 13:05:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591319', 'tblTempUsageDetail_20' ) end [2025-03-02 13:05:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:05:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:05:22] Production.INFO: ==17622== Releasing lock... [2025-03-02 13:05:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:05:22] Production.INFO: 36.25 MB #Memory Used# [2025-03-02 13:06:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:06:06 [end_date_ymd] => 2025-03-02 13:06:06 [RateCDR] => 1 ) [2025-03-02 13: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-03-02 10:06:06' and `end` < '2025-03-02 13: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-03-02 13:06:18] Production.INFO: count ==1005 [2025-03-02 13:06:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:06:06 - End Time 2025-03-02 13:06:06 [2025-03-02 13:06:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:06:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591324', 'tblTempUsageDetail_20' ) start [2025-03-02 13:06:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591324', 'tblTempUsageDetail_20' ) end [2025-03-02 13:06:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591324', 'tblTempVendorCDR_20' ) start [2025-03-02 13:06:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591324', 'tblTempVendorCDR_20' ) end [2025-03-02 13:06:18] Production.INFO: ProcessCDR(1,14591324,1,1,2) [2025-03-02 13:06:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591324,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:06:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591324,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:06:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591324,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:06:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591324,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:06:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591324', 'tblTempUsageDetail_20' ) start [2025-03-02 13:06:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591324', 'tblTempUsageDetail_20' ) end [2025-03-02 13:06:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:06:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:06:23] Production.INFO: ==17716== Releasing lock... [2025-03-02 13:06:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:06:23] Production.INFO: 36 MB #Memory Used# [2025-03-02 13:07:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:07:06 [end_date_ymd] => 2025-03-02 13:07:06 [RateCDR] => 1 ) [2025-03-02 13: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-03-02 10:07:06' and `end` < '2025-03-02 13: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-03-02 13:07:18] Production.INFO: count ==1009 [2025-03-02 13:07:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:07:06 - End Time 2025-03-02 13:07:06 [2025-03-02 13:07:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591329', 'tblTempUsageDetail_20' ) start [2025-03-02 13:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591329', 'tblTempUsageDetail_20' ) end [2025-03-02 13:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591329', 'tblTempVendorCDR_20' ) start [2025-03-02 13:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591329', 'tblTempVendorCDR_20' ) end [2025-03-02 13:07:18] Production.INFO: ProcessCDR(1,14591329,1,1,2) [2025-03-02 13:07:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591329,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:07:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591329,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:07:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591329,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:07:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591329,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:07:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591329', 'tblTempUsageDetail_20' ) start [2025-03-02 13:07:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591329', 'tblTempUsageDetail_20' ) end [2025-03-02 13:07:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:07:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:07:23] Production.INFO: ==17795== Releasing lock... [2025-03-02 13:07:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:07:23] Production.INFO: 35.5 MB #Memory Used# [2025-03-02 13:08:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:08:05 [end_date_ymd] => 2025-03-02 13:08:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:08:05' and `end` < '2025-03-02 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-03-02 13:08:17] Production.INFO: count ==1009 [2025-03-02 13:08:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:08:05 - End Time 2025-03-02 13:08:05 [2025-03-02 13:08:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591334', 'tblTempUsageDetail_20' ) start [2025-03-02 13:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591334', 'tblTempUsageDetail_20' ) end [2025-03-02 13:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591334', 'tblTempVendorCDR_20' ) start [2025-03-02 13:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591334', 'tblTempVendorCDR_20' ) end [2025-03-02 13:08:18] Production.INFO: ProcessCDR(1,14591334,1,1,2) [2025-03-02 13:08:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591334,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:08:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591334,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:08:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591334,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:08:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591334,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:08:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591334', 'tblTempUsageDetail_20' ) start [2025-03-02 13:08:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591334', 'tblTempUsageDetail_20' ) end [2025-03-02 13:08:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:08:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:08:21] Production.INFO: ==17873== Releasing lock... [2025-03-02 13:08:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:08:21] Production.INFO: 35.5 MB #Memory Used# [2025-03-02 13:09:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:09:05 [end_date_ymd] => 2025-03-02 13:09:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:09:05' and `end` < '2025-03-02 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-03-02 13:09:17] Production.INFO: count ==1010 [2025-03-02 13:09:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:09:05 - End Time 2025-03-02 13:09:05 [2025-03-02 13:09:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591339', 'tblTempUsageDetail_20' ) start [2025-03-02 13:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591339', 'tblTempUsageDetail_20' ) end [2025-03-02 13:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591339', 'tblTempVendorCDR_20' ) start [2025-03-02 13:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591339', 'tblTempVendorCDR_20' ) end [2025-03-02 13:09:18] Production.INFO: ProcessCDR(1,14591339,1,1,2) [2025-03-02 13:09:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591339,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:09:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591339,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:09:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591339,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:09:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591339,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:09:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591339', 'tblTempUsageDetail_20' ) start [2025-03-02 13:09:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591339', 'tblTempUsageDetail_20' ) end [2025-03-02 13:09:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:09:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:09:23] Production.INFO: ==17945== Releasing lock... [2025-03-02 13:09:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:09:23] Production.INFO: 35.75 MB #Memory Used# [2025-03-02 13:10:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:10:06 [end_date_ymd] => 2025-03-02 13:10:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:10:06' and `end` < '2025-03-02 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-03-02 13:10:18] Production.INFO: count ==1015 [2025-03-02 13:10:19] Production.ERROR: pbx CDR StartTime 2025-03-02 10:10:06 - End Time 2025-03-02 13:10:06 [2025-03-02 13:10:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:10:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591345', 'tblTempUsageDetail_20' ) start [2025-03-02 13:10:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591345', 'tblTempUsageDetail_20' ) end [2025-03-02 13:10:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591345', 'tblTempVendorCDR_20' ) start [2025-03-02 13:10:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591345', 'tblTempVendorCDR_20' ) end [2025-03-02 13:10:19] Production.INFO: ProcessCDR(1,14591345,1,1,2) [2025-03-02 13:10:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591345,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:10:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591345,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:10:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591345,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:10:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591345,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:10:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591345', 'tblTempUsageDetail_20' ) start [2025-03-02 13:10:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591345', 'tblTempUsageDetail_20' ) end [2025-03-02 13:10:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:10:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:10:23] Production.INFO: ==18017== Releasing lock... [2025-03-02 13:10:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:10:23] Production.INFO: 36 MB #Memory Used# [2025-03-02 13:11:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:11:06 [end_date_ymd] => 2025-03-02 13:11:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:11:06' and `end` < '2025-03-02 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-03-02 13:11:18] Production.INFO: count ==1043 [2025-03-02 13:11:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:11:06 - End Time 2025-03-02 13:11:06 [2025-03-02 13:11:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:11:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591350', 'tblTempUsageDetail_20' ) start [2025-03-02 13:11:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591350', 'tblTempUsageDetail_20' ) end [2025-03-02 13:11:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591350', 'tblTempVendorCDR_20' ) start [2025-03-02 13:11:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591350', 'tblTempVendorCDR_20' ) end [2025-03-02 13:11:18] Production.INFO: ProcessCDR(1,14591350,1,1,2) [2025-03-02 13:11:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591350,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:11:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591350,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:11:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591350,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:11:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591350,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:11:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591350', 'tblTempUsageDetail_20' ) start [2025-03-02 13:11:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591350', 'tblTempUsageDetail_20' ) end [2025-03-02 13:11:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:11:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:11:22] Production.INFO: ==18102== Releasing lock... [2025-03-02 13:11:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:11:22] Production.INFO: 36.25 MB #Memory Used# [2025-03-02 13:12:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:12:05 [end_date_ymd] => 2025-03-02 13:12:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:12:05' and `end` < '2025-03-02 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-03-02 13:12:17] Production.INFO: count ==1043 [2025-03-02 13:12:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:12:05 - End Time 2025-03-02 13:12:05 [2025-03-02 13:12:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591355', 'tblTempUsageDetail_20' ) start [2025-03-02 13:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591355', 'tblTempUsageDetail_20' ) end [2025-03-02 13:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591355', 'tblTempVendorCDR_20' ) start [2025-03-02 13:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591355', 'tblTempVendorCDR_20' ) end [2025-03-02 13:12:18] Production.INFO: ProcessCDR(1,14591355,1,1,2) [2025-03-02 13:12:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591355,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:12:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591355,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:12:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591355,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:12:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591355,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:12:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591355', 'tblTempUsageDetail_20' ) start [2025-03-02 13:12:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591355', 'tblTempUsageDetail_20' ) end [2025-03-02 13:12:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:12:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:12:21] Production.INFO: ==18179== Releasing lock... [2025-03-02 13:12:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:12:21] Production.INFO: 36.25 MB #Memory Used# [2025-03-02 13:13:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:13:06 [end_date_ymd] => 2025-03-02 13:13:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:13:06' and `end` < '2025-03-02 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-03-02 13:13:18] Production.INFO: count ==1053 [2025-03-02 13:13:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:13:06 - End Time 2025-03-02 13:13:06 [2025-03-02 13:13:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591360', 'tblTempUsageDetail_20' ) start [2025-03-02 13:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591360', 'tblTempUsageDetail_20' ) end [2025-03-02 13:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591360', 'tblTempVendorCDR_20' ) start [2025-03-02 13:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591360', 'tblTempVendorCDR_20' ) end [2025-03-02 13:13:18] Production.INFO: ProcessCDR(1,14591360,1,1,2) [2025-03-02 13:13:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591360,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:13:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591360,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:13:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591360,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:13:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591360,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:13:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591360', 'tblTempUsageDetail_20' ) start [2025-03-02 13:13:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591360', 'tblTempUsageDetail_20' ) end [2025-03-02 13:13:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:13:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:13:24] Production.INFO: ==18259== Releasing lock... [2025-03-02 13:13:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:13:24] Production.INFO: 36.5 MB #Memory Used# [2025-03-02 13:14:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:14:05 [end_date_ymd] => 2025-03-02 13:14:05 [RateCDR] => 1 ) [2025-03-02 13: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-03-02 10:14:05' and `end` < '2025-03-02 13: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-03-02 13:14:17] Production.INFO: count ==1064 [2025-03-02 13:14:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:14:05 - End Time 2025-03-02 13:14:05 [2025-03-02 13:14:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591365', 'tblTempUsageDetail_20' ) start [2025-03-02 13:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591365', 'tblTempUsageDetail_20' ) end [2025-03-02 13:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591365', 'tblTempVendorCDR_20' ) start [2025-03-02 13:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591365', 'tblTempVendorCDR_20' ) end [2025-03-02 13:14:18] Production.INFO: ProcessCDR(1,14591365,1,1,2) [2025-03-02 13:14:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591365,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:14:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591365,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:14:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591365,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:14:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591365,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:14:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591365', 'tblTempUsageDetail_20' ) start [2025-03-02 13:14:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591365', 'tblTempUsageDetail_20' ) end [2025-03-02 13:14:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:14:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:14:21] Production.INFO: ==18340== Releasing lock... [2025-03-02 13:14:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:14:21] Production.INFO: 36.25 MB #Memory Used# [2025-03-02 13:15:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:15:06 [end_date_ymd] => 2025-03-02 13:15:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:15:06' and `end` < '2025-03-02 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-03-02 13:15:18] Production.INFO: count ==1082 [2025-03-02 13:15:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:15:06 - End Time 2025-03-02 13:15:06 [2025-03-02 13:15:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591370', 'tblTempUsageDetail_20' ) start [2025-03-02 13:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591370', 'tblTempUsageDetail_20' ) end [2025-03-02 13:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591370', 'tblTempVendorCDR_20' ) start [2025-03-02 13:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591370', 'tblTempVendorCDR_20' ) end [2025-03-02 13:15:18] Production.INFO: ProcessCDR(1,14591370,1,1,2) [2025-03-02 13:15:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591370,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:15:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591370,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:15:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591370,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:15:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591370,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:15:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591370', 'tblTempUsageDetail_20' ) start [2025-03-02 13:15:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591370', 'tblTempUsageDetail_20' ) end [2025-03-02 13:15:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:15:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:15:22] Production.INFO: ==18421== Releasing lock... [2025-03-02 13:15:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:15:22] Production.INFO: 36.75 MB #Memory Used# [2025-03-02 13:16:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:16:06 [end_date_ymd] => 2025-03-02 13:16:06 [RateCDR] => 1 ) [2025-03-02 13: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-03-02 10:16:06' and `end` < '2025-03-02 13: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-03-02 13:16:18] Production.INFO: count ==1071 [2025-03-02 13:16:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:16:06 - End Time 2025-03-02 13:16:06 [2025-03-02 13:16:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591375', 'tblTempUsageDetail_20' ) start [2025-03-02 13:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591375', 'tblTempUsageDetail_20' ) end [2025-03-02 13:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591375', 'tblTempVendorCDR_20' ) start [2025-03-02 13:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591375', 'tblTempVendorCDR_20' ) end [2025-03-02 13:16:18] Production.INFO: ProcessCDR(1,14591375,1,1,2) [2025-03-02 13:16:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591375,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:16:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591375,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:16:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591375,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:16:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591375,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591375', 'tblTempUsageDetail_20' ) start [2025-03-02 13:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591375', 'tblTempUsageDetail_20' ) end [2025-03-02 13:16:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:16:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:16:21] Production.INFO: ==18504== Releasing lock... [2025-03-02 13:16:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:16:21] Production.INFO: 36.5 MB #Memory Used# [2025-03-02 13:17:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:17:06 [end_date_ymd] => 2025-03-02 13:17:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:17:06' and `end` < '2025-03-02 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-03-02 13:17:18] Production.INFO: count ==1074 [2025-03-02 13:17:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:17:06 - End Time 2025-03-02 13:17:06 [2025-03-02 13:17:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591380', 'tblTempUsageDetail_20' ) start [2025-03-02 13:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591380', 'tblTempUsageDetail_20' ) end [2025-03-02 13:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591380', 'tblTempVendorCDR_20' ) start [2025-03-02 13:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591380', 'tblTempVendorCDR_20' ) end [2025-03-02 13:17:18] Production.INFO: ProcessCDR(1,14591380,1,1,2) [2025-03-02 13:17:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591380,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:17:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591380,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:17:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591380,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:17:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591380,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:17:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591380', 'tblTempUsageDetail_20' ) start [2025-03-02 13:17:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591380', 'tblTempUsageDetail_20' ) end [2025-03-02 13:17:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:17:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:17:23] Production.INFO: ==18620== Releasing lock... [2025-03-02 13:17:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:17:23] Production.INFO: 36.25 MB #Memory Used# [2025-03-02 13:18:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:18:05 [end_date_ymd] => 2025-03-02 13:18:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:18:05' and `end` < '2025-03-02 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-03-02 13:18:17] Production.INFO: count ==1074 [2025-03-02 13:18:17] Production.ERROR: pbx CDR StartTime 2025-03-02 10:18:05 - End Time 2025-03-02 13:18:05 [2025-03-02 13:18:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591385', 'tblTempUsageDetail_20' ) start [2025-03-02 13:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591385', 'tblTempUsageDetail_20' ) end [2025-03-02 13:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591385', 'tblTempVendorCDR_20' ) start [2025-03-02 13:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591385', 'tblTempVendorCDR_20' ) end [2025-03-02 13:18:17] Production.INFO: ProcessCDR(1,14591385,1,1,2) [2025-03-02 13:18:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591385,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:18:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591385,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:18:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591385,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:18:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591385,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591385', 'tblTempUsageDetail_20' ) start [2025-03-02 13:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591385', 'tblTempUsageDetail_20' ) end [2025-03-02 13:18:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:18:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:18:21] Production.INFO: ==18706== Releasing lock... [2025-03-02 13:18:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:18:21] Production.INFO: 36.25 MB #Memory Used# [2025-03-02 13:19:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:19:06 [end_date_ymd] => 2025-03-02 13:19:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:19:06' and `end` < '2025-03-02 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-03-02 13:19:18] Production.INFO: count ==1074 [2025-03-02 13:19:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:19:06 - End Time 2025-03-02 13:19:06 [2025-03-02 13:19:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591390', 'tblTempUsageDetail_20' ) start [2025-03-02 13:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591390', 'tblTempUsageDetail_20' ) end [2025-03-02 13:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591390', 'tblTempVendorCDR_20' ) start [2025-03-02 13:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591390', 'tblTempVendorCDR_20' ) end [2025-03-02 13:19:18] Production.INFO: ProcessCDR(1,14591390,1,1,2) [2025-03-02 13:19:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591390,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:19:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591390,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:19:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591390,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:19:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591390,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:19:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591390', 'tblTempUsageDetail_20' ) start [2025-03-02 13:19:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591390', 'tblTempUsageDetail_20' ) end [2025-03-02 13:19:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:19:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:19:22] Production.INFO: ==18788== Releasing lock... [2025-03-02 13:19:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:19:22] Production.INFO: 36.25 MB #Memory Used# [2025-03-02 13:20:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:20:06 [end_date_ymd] => 2025-03-02 13:20:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:20:06' and `end` < '2025-03-02 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-03-02 13:20:18] Production.INFO: count ==1074 [2025-03-02 13:20:19] Production.ERROR: pbx CDR StartTime 2025-03-02 10:20:06 - End Time 2025-03-02 13:20:06 [2025-03-02 13:20:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:20:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591396', 'tblTempUsageDetail_20' ) start [2025-03-02 13:20:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591396', 'tblTempUsageDetail_20' ) end [2025-03-02 13:20:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591396', 'tblTempVendorCDR_20' ) start [2025-03-02 13:20:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591396', 'tblTempVendorCDR_20' ) end [2025-03-02 13:20:19] Production.INFO: ProcessCDR(1,14591396,1,1,2) [2025-03-02 13:20:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591396,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:20:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591396,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:20:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591396,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:20:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591396,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591396', 'tblTempUsageDetail_20' ) start [2025-03-02 13:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591396', 'tblTempUsageDetail_20' ) end [2025-03-02 13:20:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:20:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:20:22] Production.INFO: ==18868== Releasing lock... [2025-03-02 13:20:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:20:22] Production.INFO: 36.25 MB #Memory Used# [2025-03-02 13:21:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:21:05 [end_date_ymd] => 2025-03-02 13:21:05 [RateCDR] => 1 ) [2025-03-02 13: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-03-02 10:21:05' and `end` < '2025-03-02 13: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-03-02 13:21:17] Production.INFO: count ==1075 [2025-03-02 13:21:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:21:05 - End Time 2025-03-02 13:21:05 [2025-03-02 13:21:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:21:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591401', 'tblTempUsageDetail_20' ) start [2025-03-02 13:21:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591401', 'tblTempUsageDetail_20' ) end [2025-03-02 13:21:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591401', 'tblTempVendorCDR_20' ) start [2025-03-02 13:21:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591401', 'tblTempVendorCDR_20' ) end [2025-03-02 13:21:18] Production.INFO: ProcessCDR(1,14591401,1,1,2) [2025-03-02 13:21:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591401,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:21:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591401,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:21:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591401,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:21:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591401,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:21:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591401', 'tblTempUsageDetail_20' ) start [2025-03-02 13:21:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591401', 'tblTempUsageDetail_20' ) end [2025-03-02 13:21:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:21:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:21:23] Production.INFO: ==18961== Releasing lock... [2025-03-02 13:21:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:21:23] Production.INFO: 36.5 MB #Memory Used# [2025-03-02 13:22:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:22:05 [end_date_ymd] => 2025-03-02 13:22:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:22:05' and `end` < '2025-03-02 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-03-02 13:22:17] Production.INFO: count ==1081 [2025-03-02 13:22:17] Production.ERROR: pbx CDR StartTime 2025-03-02 10:22:05 - End Time 2025-03-02 13:22:05 [2025-03-02 13:22:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591406', 'tblTempUsageDetail_20' ) start [2025-03-02 13:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591406', 'tblTempUsageDetail_20' ) end [2025-03-02 13:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591406', 'tblTempVendorCDR_20' ) start [2025-03-02 13:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591406', 'tblTempVendorCDR_20' ) end [2025-03-02 13:22:17] Production.INFO: ProcessCDR(1,14591406,1,1,2) [2025-03-02 13:22:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591406,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:22:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591406,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:22:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591406,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:22:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591406,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591406', 'tblTempUsageDetail_20' ) start [2025-03-02 13:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591406', 'tblTempUsageDetail_20' ) end [2025-03-02 13:22:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:22:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:22:21] Production.INFO: ==19035== Releasing lock... [2025-03-02 13:22:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:22:21] Production.INFO: 36.5 MB #Memory Used# [2025-03-02 13:23:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:23:05 [end_date_ymd] => 2025-03-02 13:23:05 [RateCDR] => 1 ) [2025-03-02 13: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-03-02 10:23:05' and `end` < '2025-03-02 13: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-03-02 13:23:17] Production.INFO: count ==1079 [2025-03-02 13:23:17] Production.ERROR: pbx CDR StartTime 2025-03-02 10:23:05 - End Time 2025-03-02 13:23:05 [2025-03-02 13:23:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591411', 'tblTempUsageDetail_20' ) start [2025-03-02 13:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591411', 'tblTempUsageDetail_20' ) end [2025-03-02 13:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591411', 'tblTempVendorCDR_20' ) start [2025-03-02 13:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591411', 'tblTempVendorCDR_20' ) end [2025-03-02 13:23:17] Production.INFO: ProcessCDR(1,14591411,1,1,2) [2025-03-02 13:23:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591411,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:23:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591411,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:23:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591411,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:23:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591411,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:23:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591411', 'tblTempUsageDetail_20' ) start [2025-03-02 13:23:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591411', 'tblTempUsageDetail_20' ) end [2025-03-02 13:23:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:23:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:23:21] Production.INFO: ==19115== Releasing lock... [2025-03-02 13:23:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:23:21] Production.INFO: 36.5 MB #Memory Used# [2025-03-02 13:24:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:24:06 [end_date_ymd] => 2025-03-02 13:24:06 [RateCDR] => 1 ) [2025-03-02 13: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-03-02 10:24:06' and `end` < '2025-03-02 13: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-03-02 13:24:18] Production.INFO: count ==1077 [2025-03-02 13:24:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:24:06 - End Time 2025-03-02 13:24:06 [2025-03-02 13:24:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591416', 'tblTempUsageDetail_20' ) start [2025-03-02 13:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591416', 'tblTempUsageDetail_20' ) end [2025-03-02 13:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591416', 'tblTempVendorCDR_20' ) start [2025-03-02 13:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591416', 'tblTempVendorCDR_20' ) end [2025-03-02 13:24:18] Production.INFO: ProcessCDR(1,14591416,1,1,2) [2025-03-02 13:24:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591416,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:24:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591416,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:24:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591416,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:24:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591416,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591416', 'tblTempUsageDetail_20' ) start [2025-03-02 13:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591416', 'tblTempUsageDetail_20' ) end [2025-03-02 13:24:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:24:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:24:21] Production.INFO: ==19191== Releasing lock... [2025-03-02 13:24:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:24:21] Production.INFO: 36.75 MB #Memory Used# [2025-03-02 13:25:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:25:05 [end_date_ymd] => 2025-03-02 13:25:05 [RateCDR] => 1 ) [2025-03-02 13: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-03-02 10:25:05' and `end` < '2025-03-02 13: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-03-02 13:25:17] Production.INFO: count ==1077 [2025-03-02 13:25:17] Production.ERROR: pbx CDR StartTime 2025-03-02 10:25:05 - End Time 2025-03-02 13:25:05 [2025-03-02 13:25:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591421', 'tblTempUsageDetail_20' ) start [2025-03-02 13:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591421', 'tblTempUsageDetail_20' ) end [2025-03-02 13:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591421', 'tblTempVendorCDR_20' ) start [2025-03-02 13:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591421', 'tblTempVendorCDR_20' ) end [2025-03-02 13:25:17] Production.INFO: ProcessCDR(1,14591421,1,1,2) [2025-03-02 13:25:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591421,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:25:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591421,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:25:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591421,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:25:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591421,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:25:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591421', 'tblTempUsageDetail_20' ) start [2025-03-02 13:25:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591421', 'tblTempUsageDetail_20' ) end [2025-03-02 13:25:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:25:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:25:20] Production.INFO: ==19272== Releasing lock... [2025-03-02 13:25:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:25:20] Production.INFO: 36.75 MB #Memory Used# [2025-03-02 13:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:26:05 [end_date_ymd] => 2025-03-02 13:26:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:26:05' and `end` < '2025-03-02 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-03-02 13:26:18] Production.INFO: count ==1075 [2025-03-02 13:26:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:26:05 - End Time 2025-03-02 13:26:05 [2025-03-02 13:26:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591426', 'tblTempUsageDetail_20' ) start [2025-03-02 13:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591426', 'tblTempUsageDetail_20' ) end [2025-03-02 13:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591426', 'tblTempVendorCDR_20' ) start [2025-03-02 13:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591426', 'tblTempVendorCDR_20' ) end [2025-03-02 13:26:18] Production.INFO: ProcessCDR(1,14591426,1,1,2) [2025-03-02 13:26:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591426,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:26:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591426,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:26:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591426,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:26:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591426,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:26:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591426', 'tblTempUsageDetail_20' ) start [2025-03-02 13:26:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591426', 'tblTempUsageDetail_20' ) end [2025-03-02 13:26:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:26:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:26:21] Production.INFO: ==19364== Releasing lock... [2025-03-02 13:26:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:26:21] Production.INFO: 36.5 MB #Memory Used# [2025-03-02 13:27:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:27:05 [end_date_ymd] => 2025-03-02 13:27:05 [RateCDR] => 1 ) [2025-03-02 13: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-03-02 10:27:05' and `end` < '2025-03-02 13: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-03-02 13:27:17] Production.INFO: count ==1073 [2025-03-02 13:27:17] Production.ERROR: pbx CDR StartTime 2025-03-02 10:27:05 - End Time 2025-03-02 13:27:05 [2025-03-02 13:27:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591431', 'tblTempUsageDetail_20' ) start [2025-03-02 13:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591431', 'tblTempUsageDetail_20' ) end [2025-03-02 13:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591431', 'tblTempVendorCDR_20' ) start [2025-03-02 13:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591431', 'tblTempVendorCDR_20' ) end [2025-03-02 13:27:17] Production.INFO: ProcessCDR(1,14591431,1,1,2) [2025-03-02 13:27:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591431,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:27:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591431,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:27:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591431,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:27:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591431,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:27:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591431', 'tblTempUsageDetail_20' ) start [2025-03-02 13:27:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591431', 'tblTempUsageDetail_20' ) end [2025-03-02 13:27:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:27:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:27:20] Production.INFO: ==19449== Releasing lock... [2025-03-02 13:27:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:27:20] Production.INFO: 36.25 MB #Memory Used# [2025-03-02 13:28:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:28:06 [end_date_ymd] => 2025-03-02 13:28:06 [RateCDR] => 1 ) [2025-03-02 13: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-03-02 10:28:06' and `end` < '2025-03-02 13: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-03-02 13:28:18] Production.INFO: count ==1078 [2025-03-02 13:28:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:28:06 - End Time 2025-03-02 13:28:06 [2025-03-02 13:28:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591436', 'tblTempUsageDetail_20' ) start [2025-03-02 13:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591436', 'tblTempUsageDetail_20' ) end [2025-03-02 13:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591436', 'tblTempVendorCDR_20' ) start [2025-03-02 13:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591436', 'tblTempVendorCDR_20' ) end [2025-03-02 13:28:18] Production.INFO: ProcessCDR(1,14591436,1,1,2) [2025-03-02 13:28:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591436,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:28:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591436,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:28:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591436,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:28:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591436,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:28:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591436', 'tblTempUsageDetail_20' ) start [2025-03-02 13:28:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591436', 'tblTempUsageDetail_20' ) end [2025-03-02 13:28:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:28:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:28:22] Production.INFO: ==19537== Releasing lock... [2025-03-02 13:28:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:28:22] Production.INFO: 37 MB #Memory Used# [2025-03-02 13:29:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:29:05 [end_date_ymd] => 2025-03-02 13:29:05 [RateCDR] => 1 ) [2025-03-02 13: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-03-02 10:29:05' and `end` < '2025-03-02 13: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-03-02 13:29:17] Production.INFO: count ==1078 [2025-03-02 13:29:17] Production.ERROR: pbx CDR StartTime 2025-03-02 10:29:05 - End Time 2025-03-02 13:29:05 [2025-03-02 13:29:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591441', 'tblTempUsageDetail_20' ) start [2025-03-02 13:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591441', 'tblTempUsageDetail_20' ) end [2025-03-02 13:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591441', 'tblTempVendorCDR_20' ) start [2025-03-02 13:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591441', 'tblTempVendorCDR_20' ) end [2025-03-02 13:29:17] Production.INFO: ProcessCDR(1,14591441,1,1,2) [2025-03-02 13:29:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591441,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:29:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591441,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:29:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591441,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:29:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591441,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:29:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591441', 'tblTempUsageDetail_20' ) start [2025-03-02 13:29:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591441', 'tblTempUsageDetail_20' ) end [2025-03-02 13:29:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:29:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:29:20] Production.INFO: ==19613== Releasing lock... [2025-03-02 13:29:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:29:20] Production.INFO: 37 MB #Memory Used# [2025-03-02 13:30:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:30:06 [end_date_ymd] => 2025-03-02 13:30:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:30:06' and `end` < '2025-03-02 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-03-02 13:30:18] Production.INFO: count ==1082 [2025-03-02 13:30:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:30:06 - End Time 2025-03-02 13:30:06 [2025-03-02 13:30:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591447', 'tblTempUsageDetail_20' ) start [2025-03-02 13:30:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591447', 'tblTempUsageDetail_20' ) end [2025-03-02 13:30:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591447', 'tblTempVendorCDR_20' ) start [2025-03-02 13:30:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591447', 'tblTempVendorCDR_20' ) end [2025-03-02 13:30:19] Production.INFO: ProcessCDR(1,14591447,1,1,2) [2025-03-02 13:30:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591447,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:30:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591447,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:30:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591447,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:30:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591447,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:30:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591447', 'tblTempUsageDetail_20' ) start [2025-03-02 13:30:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591447', 'tblTempUsageDetail_20' ) end [2025-03-02 13:30:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:30:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:30:22] Production.INFO: ==19690== Releasing lock... [2025-03-02 13:30:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:30:22] Production.INFO: 36.5 MB #Memory Used# [2025-03-02 13:31:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:31:05 [end_date_ymd] => 2025-03-02 13:31:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:31:05' and `end` < '2025-03-02 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-03-02 13:31:17] Production.INFO: count ==1124 [2025-03-02 13:31:17] Production.ERROR: pbx CDR StartTime 2025-03-02 10:31:05 - End Time 2025-03-02 13:31:05 [2025-03-02 13:31:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591452', 'tblTempUsageDetail_20' ) start [2025-03-02 13:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591452', 'tblTempUsageDetail_20' ) end [2025-03-02 13:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591452', 'tblTempVendorCDR_20' ) start [2025-03-02 13:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591452', 'tblTempVendorCDR_20' ) end [2025-03-02 13:31:17] Production.INFO: ProcessCDR(1,14591452,1,1,2) [2025-03-02 13:31:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591452,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:31:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591452,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:31:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591452,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:31:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591452,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:31:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591452', 'tblTempUsageDetail_20' ) start [2025-03-02 13:31:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591452', 'tblTempUsageDetail_20' ) end [2025-03-02 13:31:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:31:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:31:21] Production.INFO: ==19769== Releasing lock... [2025-03-02 13:31:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:31:21] Production.INFO: 36.5 MB #Memory Used# [2025-03-02 13:32:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:32:05 [end_date_ymd] => 2025-03-02 13:32:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:32:05' and `end` < '2025-03-02 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-03-02 13:32:17] Production.INFO: count ==1123 [2025-03-02 13:32:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:32:05 - End Time 2025-03-02 13:32:05 [2025-03-02 13:32:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:32:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591457', 'tblTempUsageDetail_20' ) start [2025-03-02 13:32:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591457', 'tblTempUsageDetail_20' ) end [2025-03-02 13:32:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591457', 'tblTempVendorCDR_20' ) start [2025-03-02 13:32:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591457', 'tblTempVendorCDR_20' ) end [2025-03-02 13:32:18] Production.INFO: ProcessCDR(1,14591457,1,1,2) [2025-03-02 13:32:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591457,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:32:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591457,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:32:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591457,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:32:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591457,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:32:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591457', 'tblTempUsageDetail_20' ) start [2025-03-02 13:32:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591457', 'tblTempUsageDetail_20' ) end [2025-03-02 13:32:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:32:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:32:21] Production.INFO: ==19905== Releasing lock... [2025-03-02 13:32:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:32:21] Production.INFO: 37 MB #Memory Used# [2025-03-02 13:33:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:33:06 [end_date_ymd] => 2025-03-02 13:33:06 [RateCDR] => 1 ) [2025-03-02 13: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-03-02 10:33:06' and `end` < '2025-03-02 13: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-03-02 13:33:18] Production.INFO: count ==1124 [2025-03-02 13:33:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:33:06 - End Time 2025-03-02 13:33:06 [2025-03-02 13:33:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591462', 'tblTempUsageDetail_20' ) start [2025-03-02 13:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591462', 'tblTempUsageDetail_20' ) end [2025-03-02 13:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591462', 'tblTempVendorCDR_20' ) start [2025-03-02 13:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591462', 'tblTempVendorCDR_20' ) end [2025-03-02 13:33:18] Production.INFO: ProcessCDR(1,14591462,1,1,2) [2025-03-02 13:33:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591462,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:33:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591462,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:33:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591462,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:33:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591462,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:33:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591462', 'tblTempUsageDetail_20' ) start [2025-03-02 13:33:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591462', 'tblTempUsageDetail_20' ) end [2025-03-02 13:33:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:33:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:33:23] Production.INFO: ==19980== Releasing lock... [2025-03-02 13:33:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:33:23] Production.INFO: 37 MB #Memory Used# [2025-03-02 13:34:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:34:05 [end_date_ymd] => 2025-03-02 13:34:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:34:05' and `end` < '2025-03-02 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-03-02 13:34:17] Production.INFO: count ==1123 [2025-03-02 13:34:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:34:05 - End Time 2025-03-02 13:34:05 [2025-03-02 13:34:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591467', 'tblTempUsageDetail_20' ) start [2025-03-02 13:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591467', 'tblTempUsageDetail_20' ) end [2025-03-02 13:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591467', 'tblTempVendorCDR_20' ) start [2025-03-02 13:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591467', 'tblTempVendorCDR_20' ) end [2025-03-02 13:34:18] Production.INFO: ProcessCDR(1,14591467,1,1,2) [2025-03-02 13:34:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591467,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:34:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591467,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:34:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591467,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:34:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591467,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:34:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591467', 'tblTempUsageDetail_20' ) start [2025-03-02 13:34:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591467', 'tblTempUsageDetail_20' ) end [2025-03-02 13:34:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:34:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:34:22] Production.INFO: ==20057== Releasing lock... [2025-03-02 13:34:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:34:22] Production.INFO: 36.75 MB #Memory Used# [2025-03-02 13:35:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:35:06 [end_date_ymd] => 2025-03-02 13:35:06 [RateCDR] => 1 ) [2025-03-02 13: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-03-02 10:35:06' and `end` < '2025-03-02 13: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-03-02 13:35:18] Production.INFO: count ==1121 [2025-03-02 13:35:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:35:06 - End Time 2025-03-02 13:35:06 [2025-03-02 13:35:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591472', 'tblTempUsageDetail_20' ) start [2025-03-02 13:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591472', 'tblTempUsageDetail_20' ) end [2025-03-02 13:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591472', 'tblTempVendorCDR_20' ) start [2025-03-02 13:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591472', 'tblTempVendorCDR_20' ) end [2025-03-02 13:35:18] Production.INFO: ProcessCDR(1,14591472,1,1,2) [2025-03-02 13:35:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591472,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:35:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591472,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:35:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591472,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:35:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591472,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:35:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591472', 'tblTempUsageDetail_20' ) start [2025-03-02 13:35:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591472', 'tblTempUsageDetail_20' ) end [2025-03-02 13:35:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:35:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:35:23] Production.INFO: ==20134== Releasing lock... [2025-03-02 13:35:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:35:23] Production.INFO: 36.75 MB #Memory Used# [2025-03-02 13:36:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:36:05 [end_date_ymd] => 2025-03-02 13:36:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:36:05' and `end` < '2025-03-02 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-03-02 13:36:17] Production.INFO: count ==1121 [2025-03-02 13:36:17] Production.ERROR: pbx CDR StartTime 2025-03-02 10:36:05 - End Time 2025-03-02 13:36:05 [2025-03-02 13:36:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591477', 'tblTempUsageDetail_20' ) start [2025-03-02 13:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591477', 'tblTempUsageDetail_20' ) end [2025-03-02 13:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591477', 'tblTempVendorCDR_20' ) start [2025-03-02 13:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591477', 'tblTempVendorCDR_20' ) end [2025-03-02 13:36:17] Production.INFO: ProcessCDR(1,14591477,1,1,2) [2025-03-02 13:36:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591477,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:36:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591477,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:36:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591477,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:36:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591477,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:36:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591477', 'tblTempUsageDetail_20' ) start [2025-03-02 13:36:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591477', 'tblTempUsageDetail_20' ) end [2025-03-02 13:36:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:36:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:36:20] Production.INFO: ==20216== Releasing lock... [2025-03-02 13:36:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:36:20] Production.INFO: 36.75 MB #Memory Used# [2025-03-02 13:37:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:37:06 [end_date_ymd] => 2025-03-02 13:37:06 [RateCDR] => 1 ) [2025-03-02 13: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-03-02 10:37:06' and `end` < '2025-03-02 13: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-03-02 13:37:18] Production.INFO: count ==1120 [2025-03-02 13:37:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:37:06 - End Time 2025-03-02 13:37:06 [2025-03-02 13:37:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591482', 'tblTempUsageDetail_20' ) start [2025-03-02 13:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591482', 'tblTempUsageDetail_20' ) end [2025-03-02 13:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591482', 'tblTempVendorCDR_20' ) start [2025-03-02 13:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591482', 'tblTempVendorCDR_20' ) end [2025-03-02 13:37:18] Production.INFO: ProcessCDR(1,14591482,1,1,2) [2025-03-02 13:37:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591482,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:37:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591482,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:37:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591482,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:37:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591482,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591482', 'tblTempUsageDetail_20' ) start [2025-03-02 13:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591482', 'tblTempUsageDetail_20' ) end [2025-03-02 13:37:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:37:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:37:22] Production.INFO: ==20296== Releasing lock... [2025-03-02 13:37:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:37:22] Production.INFO: 36.5 MB #Memory Used# [2025-03-02 13:38:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:38:05 [end_date_ymd] => 2025-03-02 13:38:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:38:05' and `end` < '2025-03-02 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-03-02 13:38:17] Production.INFO: count ==1116 [2025-03-02 13:38:17] Production.ERROR: pbx CDR StartTime 2025-03-02 10:38:05 - End Time 2025-03-02 13:38:05 [2025-03-02 13:38:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591487', 'tblTempUsageDetail_20' ) start [2025-03-02 13:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591487', 'tblTempUsageDetail_20' ) end [2025-03-02 13:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591487', 'tblTempVendorCDR_20' ) start [2025-03-02 13:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591487', 'tblTempVendorCDR_20' ) end [2025-03-02 13:38:17] Production.INFO: ProcessCDR(1,14591487,1,1,2) [2025-03-02 13:38:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591487,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:38:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591487,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:38:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591487,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:38:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591487,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591487', 'tblTempUsageDetail_20' ) start [2025-03-02 13:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591487', 'tblTempUsageDetail_20' ) end [2025-03-02 13:38:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:38:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:38:21] Production.INFO: ==20372== Releasing lock... [2025-03-02 13:38:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:38:21] Production.INFO: 37 MB #Memory Used# [2025-03-02 13:39:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:39:05 [end_date_ymd] => 2025-03-02 13:39:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:39:05' and `end` < '2025-03-02 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-03-02 13:39:17] Production.INFO: count ==1120 [2025-03-02 13:39:17] Production.ERROR: pbx CDR StartTime 2025-03-02 10:39:05 - End Time 2025-03-02 13:39:05 [2025-03-02 13:39:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591492', 'tblTempUsageDetail_20' ) start [2025-03-02 13:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591492', 'tblTempUsageDetail_20' ) end [2025-03-02 13:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591492', 'tblTempVendorCDR_20' ) start [2025-03-02 13:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591492', 'tblTempVendorCDR_20' ) end [2025-03-02 13:39:17] Production.INFO: ProcessCDR(1,14591492,1,1,2) [2025-03-02 13:39:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591492,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:39:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591492,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:39:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591492,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:39:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591492,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:39:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591492', 'tblTempUsageDetail_20' ) start [2025-03-02 13:39:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591492', 'tblTempUsageDetail_20' ) end [2025-03-02 13:39:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:39:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:39:22] Production.INFO: ==20472== Releasing lock... [2025-03-02 13:39:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:39:22] Production.INFO: 36.75 MB #Memory Used# [2025-03-02 13:40:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:40:06 [end_date_ymd] => 2025-03-02 13:40:06 [RateCDR] => 1 ) [2025-03-02 13: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-03-02 10:40:06' and `end` < '2025-03-02 13: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-03-02 13:40:18] Production.INFO: count ==1122 [2025-03-02 13:40:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:40:06 - End Time 2025-03-02 13:40:06 [2025-03-02 13:40:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591498', 'tblTempUsageDetail_20' ) start [2025-03-02 13:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591498', 'tblTempUsageDetail_20' ) end [2025-03-02 13:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591498', 'tblTempVendorCDR_20' ) start [2025-03-02 13:40:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591498', 'tblTempVendorCDR_20' ) end [2025-03-02 13:40:18] Production.INFO: ProcessCDR(1,14591498,1,1,2) [2025-03-02 13:40:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591498,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:40:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591498,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:40:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591498,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:40:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591498,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:40:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591498', 'tblTempUsageDetail_20' ) start [2025-03-02 13:40:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591498', 'tblTempUsageDetail_20' ) end [2025-03-02 13:40:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:40:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:40:21] Production.INFO: ==20567== Releasing lock... [2025-03-02 13:40:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:40:21] Production.INFO: 37 MB #Memory Used# [2025-03-02 13:41:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:41:05 [end_date_ymd] => 2025-03-02 13:41:05 [RateCDR] => 1 ) [2025-03-02 13: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-03-02 10:41:05' and `end` < '2025-03-02 13: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-03-02 13:41:17] Production.INFO: count ==1136 [2025-03-02 13:41:17] Production.ERROR: pbx CDR StartTime 2025-03-02 10:41:05 - End Time 2025-03-02 13:41:05 [2025-03-02 13:41:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591503', 'tblTempUsageDetail_20' ) start [2025-03-02 13:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591503', 'tblTempUsageDetail_20' ) end [2025-03-02 13:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591503', 'tblTempVendorCDR_20' ) start [2025-03-02 13:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591503', 'tblTempVendorCDR_20' ) end [2025-03-02 13:41:17] Production.INFO: ProcessCDR(1,14591503,1,1,2) [2025-03-02 13:41:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591503,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:41:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591503,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:41:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591503,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:41:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591503,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:41:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591503', 'tblTempUsageDetail_20' ) start [2025-03-02 13:41:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591503', 'tblTempUsageDetail_20' ) end [2025-03-02 13:41:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:41:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:41:21] Production.INFO: ==20654== Releasing lock... [2025-03-02 13:41:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:41:21] Production.INFO: 36.75 MB #Memory Used# [2025-03-02 13:42:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:42:05 [end_date_ymd] => 2025-03-02 13:42:05 [RateCDR] => 1 ) [2025-03-02 13: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-03-02 10:42:05' and `end` < '2025-03-02 13: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-03-02 13:42:17] Production.INFO: count ==1138 [2025-03-02 13:42:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:42:05 - End Time 2025-03-02 13:42:05 [2025-03-02 13:42:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591508', 'tblTempUsageDetail_20' ) start [2025-03-02 13:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591508', 'tblTempUsageDetail_20' ) end [2025-03-02 13:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591508', 'tblTempVendorCDR_20' ) start [2025-03-02 13:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591508', 'tblTempVendorCDR_20' ) end [2025-03-02 13:42:18] Production.INFO: ProcessCDR(1,14591508,1,1,2) [2025-03-02 13:42:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591508,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:42:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591508,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:42:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591508,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:42:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591508,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:42:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591508', 'tblTempUsageDetail_20' ) start [2025-03-02 13:42:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591508', 'tblTempUsageDetail_20' ) end [2025-03-02 13:42:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:42:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:42:21] Production.INFO: ==20762== Releasing lock... [2025-03-02 13:42:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:42:21] Production.INFO: 36.75 MB #Memory Used# [2025-03-02 13:43:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:43:05 [end_date_ymd] => 2025-03-02 13:43:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:43:05' and `end` < '2025-03-02 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-03-02 13:43:17] Production.INFO: count ==1139 [2025-03-02 13:43:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:43:05 - End Time 2025-03-02 13:43:05 [2025-03-02 13:43:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591513', 'tblTempUsageDetail_20' ) start [2025-03-02 13:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591513', 'tblTempUsageDetail_20' ) end [2025-03-02 13:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591513', 'tblTempVendorCDR_20' ) start [2025-03-02 13:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591513', 'tblTempVendorCDR_20' ) end [2025-03-02 13:43:18] Production.INFO: ProcessCDR(1,14591513,1,1,2) [2025-03-02 13:43:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591513,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:43:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591513,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:43:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591513,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:43:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591513,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:43:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591513', 'tblTempUsageDetail_20' ) start [2025-03-02 13:43:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591513', 'tblTempUsageDetail_20' ) end [2025-03-02 13:43:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:43:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:43:23] Production.INFO: ==20843== Releasing lock... [2025-03-02 13:43:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:43:23] Production.INFO: 37 MB #Memory Used# [2025-03-02 13:44:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:44:06 [end_date_ymd] => 2025-03-02 13:44:06 [RateCDR] => 1 ) [2025-03-02 13: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-03-02 10:44:06' and `end` < '2025-03-02 13: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-03-02 13:44:18] Production.INFO: count ==1138 [2025-03-02 13:44:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:44:06 - End Time 2025-03-02 13:44:06 [2025-03-02 13:44:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591518', 'tblTempUsageDetail_20' ) start [2025-03-02 13:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591518', 'tblTempUsageDetail_20' ) end [2025-03-02 13:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591518', 'tblTempVendorCDR_20' ) start [2025-03-02 13:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591518', 'tblTempVendorCDR_20' ) end [2025-03-02 13:44:18] Production.INFO: ProcessCDR(1,14591518,1,1,2) [2025-03-02 13:44:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591518,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:44:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591518,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:44:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591518,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:44:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591518,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591518', 'tblTempUsageDetail_20' ) start [2025-03-02 13:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591518', 'tblTempUsageDetail_20' ) end [2025-03-02 13:44:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:44:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:44:21] Production.INFO: ==20929== Releasing lock... [2025-03-02 13:44:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:44:21] Production.INFO: 36.75 MB #Memory Used# [2025-03-02 13:45:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:45:05 [end_date_ymd] => 2025-03-02 13:45:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:45:05' and `end` < '2025-03-02 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-03-02 13:45:17] Production.INFO: count ==1138 [2025-03-02 13:45:17] Production.ERROR: pbx CDR StartTime 2025-03-02 10:45:05 - End Time 2025-03-02 13:45:05 [2025-03-02 13:45:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591523', 'tblTempUsageDetail_20' ) start [2025-03-02 13:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591523', 'tblTempUsageDetail_20' ) end [2025-03-02 13:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591523', 'tblTempVendorCDR_20' ) start [2025-03-02 13:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591523', 'tblTempVendorCDR_20' ) end [2025-03-02 13:45:17] Production.INFO: ProcessCDR(1,14591523,1,1,2) [2025-03-02 13:45:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591523,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:45:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591523,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:45:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591523,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:45:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591523,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:45:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591523', 'tblTempUsageDetail_20' ) start [2025-03-02 13:45:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591523', 'tblTempUsageDetail_20' ) end [2025-03-02 13:45:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:45:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:45:21] Production.INFO: ==21010== Releasing lock... [2025-03-02 13:45:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:45:21] Production.INFO: 36.75 MB #Memory Used# [2025-03-02 13:46:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:46:06 [end_date_ymd] => 2025-03-02 13:46:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:46:06' and `end` < '2025-03-02 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-03-02 13:46:18] Production.INFO: count ==1137 [2025-03-02 13:46:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:46:06 - End Time 2025-03-02 13:46:06 [2025-03-02 13:46:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591528', 'tblTempUsageDetail_20' ) start [2025-03-02 13:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591528', 'tblTempUsageDetail_20' ) end [2025-03-02 13:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591528', 'tblTempVendorCDR_20' ) start [2025-03-02 13:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591528', 'tblTempVendorCDR_20' ) end [2025-03-02 13:46:18] Production.INFO: ProcessCDR(1,14591528,1,1,2) [2025-03-02 13:46:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591528,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:46:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591528,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:46:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591528,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:46:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591528,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:46:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591528', 'tblTempUsageDetail_20' ) start [2025-03-02 13:46:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591528', 'tblTempUsageDetail_20' ) end [2025-03-02 13:46:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:46:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:46:23] Production.INFO: ==21099== Releasing lock... [2025-03-02 13:46:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:46:23] Production.INFO: 36.5 MB #Memory Used# [2025-03-02 13:47:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:47:05 [end_date_ymd] => 2025-03-02 13:47:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:47:05' and `end` < '2025-03-02 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-03-02 13:47:17] Production.INFO: count ==1139 [2025-03-02 13:47:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:47:05 - End Time 2025-03-02 13:47:05 [2025-03-02 13:47:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591533', 'tblTempUsageDetail_20' ) start [2025-03-02 13:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591533', 'tblTempUsageDetail_20' ) end [2025-03-02 13:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591533', 'tblTempVendorCDR_20' ) start [2025-03-02 13:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591533', 'tblTempVendorCDR_20' ) end [2025-03-02 13:47:18] Production.INFO: ProcessCDR(1,14591533,1,1,2) [2025-03-02 13:47:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591533,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:47:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591533,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:47:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591533,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:47:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591533,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:47:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591533', 'tblTempUsageDetail_20' ) start [2025-03-02 13:47:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591533', 'tblTempUsageDetail_20' ) end [2025-03-02 13:47:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:47:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:47:23] Production.INFO: ==21168== Releasing lock... [2025-03-02 13:47:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:47:23] Production.INFO: 37.25 MB #Memory Used# [2025-03-02 13:48:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:48:06 [end_date_ymd] => 2025-03-02 13:48:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:48:06' and `end` < '2025-03-02 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-03-02 13:48:18] Production.INFO: count ==1127 [2025-03-02 13:48:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:48:06 - End Time 2025-03-02 13:48:06 [2025-03-02 13:48:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591538', 'tblTempUsageDetail_20' ) start [2025-03-02 13:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591538', 'tblTempUsageDetail_20' ) end [2025-03-02 13:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591538', 'tblTempVendorCDR_20' ) start [2025-03-02 13:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591538', 'tblTempVendorCDR_20' ) end [2025-03-02 13:48:18] Production.INFO: ProcessCDR(1,14591538,1,1,2) [2025-03-02 13:48:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591538,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:48:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591538,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:48:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591538,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:48:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591538,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:48:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591538', 'tblTempUsageDetail_20' ) start [2025-03-02 13:48:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591538', 'tblTempUsageDetail_20' ) end [2025-03-02 13:48:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:48:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:48:23] Production.INFO: ==21279== Releasing lock... [2025-03-02 13:48:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:48:23] Production.INFO: 37 MB #Memory Used# [2025-03-02 13:49:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:49:04 [end_date_ymd] => 2025-03-02 13:49:04 [RateCDR] => 1 ) [2025-03-02 13:49: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-03-02 10:49:04' and `end` < '2025-03-02 13:49: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-03-02 13:49:16] Production.INFO: count ==1129 [2025-03-02 13:49:17] Production.ERROR: pbx CDR StartTime 2025-03-02 10:49:04 - End Time 2025-03-02 13:49:04 [2025-03-02 13:49:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591543', 'tblTempUsageDetail_20' ) start [2025-03-02 13:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591543', 'tblTempUsageDetail_20' ) end [2025-03-02 13:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591543', 'tblTempVendorCDR_20' ) start [2025-03-02 13:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591543', 'tblTempVendorCDR_20' ) end [2025-03-02 13:49:17] Production.INFO: ProcessCDR(1,14591543,1,1,2) [2025-03-02 13:49:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591543,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:49:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591543,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:49:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591543,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:49:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591543,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:49:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591543', 'tblTempUsageDetail_20' ) start [2025-03-02 13:49:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591543', 'tblTempUsageDetail_20' ) end [2025-03-02 13:49:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:49:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:49:22] Production.INFO: ==21353== Releasing lock... [2025-03-02 13:49:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:49:22] Production.INFO: 37 MB #Memory Used# [2025-03-02 13:50:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:50:06 [end_date_ymd] => 2025-03-02 13:50:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:50:06' and `end` < '2025-03-02 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-03-02 13:50:18] Production.INFO: count ==1118 [2025-03-02 13:50:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:50:06 - End Time 2025-03-02 13:50:06 [2025-03-02 13:50:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591549', 'tblTempUsageDetail_20' ) start [2025-03-02 13:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591549', 'tblTempUsageDetail_20' ) end [2025-03-02 13:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591549', 'tblTempVendorCDR_20' ) start [2025-03-02 13:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591549', 'tblTempVendorCDR_20' ) end [2025-03-02 13:50:18] Production.INFO: ProcessCDR(1,14591549,1,1,2) [2025-03-02 13:50:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591549,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:50:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591549,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:50:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591549,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:50:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591549,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:50:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591549', 'tblTempUsageDetail_20' ) start [2025-03-02 13:50:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591549', 'tblTempUsageDetail_20' ) end [2025-03-02 13:50:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:50:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:50:22] Production.INFO: ==21438== Releasing lock... [2025-03-02 13:50:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:50:22] Production.INFO: 36.75 MB #Memory Used# [2025-03-02 13:51:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:51:05 [end_date_ymd] => 2025-03-02 13:51:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:51:05' and `end` < '2025-03-02 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-03-02 13:51:17] Production.INFO: count ==1157 [2025-03-02 13:51:17] Production.ERROR: pbx CDR StartTime 2025-03-02 10:51:05 - End Time 2025-03-02 13:51:05 [2025-03-02 13:51:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591554', 'tblTempUsageDetail_20' ) start [2025-03-02 13:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591554', 'tblTempUsageDetail_20' ) end [2025-03-02 13:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591554', 'tblTempVendorCDR_20' ) start [2025-03-02 13:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591554', 'tblTempVendorCDR_20' ) end [2025-03-02 13:51:17] Production.INFO: ProcessCDR(1,14591554,1,1,2) [2025-03-02 13:51:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591554,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:51:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591554,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:51:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591554,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:51:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591554,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:51:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591554', 'tblTempUsageDetail_20' ) start [2025-03-02 13:51:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591554', 'tblTempUsageDetail_20' ) end [2025-03-02 13:51:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:51:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:51:23] Production.INFO: ==21524== Releasing lock... [2025-03-02 13:51:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:51:23] Production.INFO: 37 MB #Memory Used# [2025-03-02 13:52:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:52:06 [end_date_ymd] => 2025-03-02 13:52:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:52:06' and `end` < '2025-03-02 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-03-02 13:52:18] Production.INFO: count ==1157 [2025-03-02 13:52:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:52:06 - End Time 2025-03-02 13:52:06 [2025-03-02 13:52:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591559', 'tblTempUsageDetail_20' ) start [2025-03-02 13:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591559', 'tblTempUsageDetail_20' ) end [2025-03-02 13:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591559', 'tblTempVendorCDR_20' ) start [2025-03-02 13:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591559', 'tblTempVendorCDR_20' ) end [2025-03-02 13:52:18] Production.INFO: ProcessCDR(1,14591559,1,1,2) [2025-03-02 13:52:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591559,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:52:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591559,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:52:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591559,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:52:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591559,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:52:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591559', 'tblTempUsageDetail_20' ) start [2025-03-02 13:52:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591559', 'tblTempUsageDetail_20' ) end [2025-03-02 13:52:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:52:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:52:22] Production.INFO: ==21606== Releasing lock... [2025-03-02 13:52:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:52:22] Production.INFO: 37 MB #Memory Used# [2025-03-02 13:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:53:05 [end_date_ymd] => 2025-03-02 13:53:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:53:05' and `end` < '2025-03-02 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-03-02 13:53:17] Production.INFO: count ==1157 [2025-03-02 13:53:17] Production.ERROR: pbx CDR StartTime 2025-03-02 10:53:05 - End Time 2025-03-02 13:53:05 [2025-03-02 13:53:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591564', 'tblTempUsageDetail_20' ) start [2025-03-02 13:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591564', 'tblTempUsageDetail_20' ) end [2025-03-02 13:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591564', 'tblTempVendorCDR_20' ) start [2025-03-02 13:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591564', 'tblTempVendorCDR_20' ) end [2025-03-02 13:53:17] Production.INFO: ProcessCDR(1,14591564,1,1,2) [2025-03-02 13:53:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591564,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:53:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591564,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:53:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591564,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:53:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591564,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591564', 'tblTempUsageDetail_20' ) start [2025-03-02 13:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591564', 'tblTempUsageDetail_20' ) end [2025-03-02 13:53:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:53:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:53:21] Production.INFO: ==21687== Releasing lock... [2025-03-02 13:53:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:53:21] Production.INFO: 37.25 MB #Memory Used# [2025-03-02 13:54:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:54:06 [end_date_ymd] => 2025-03-02 13:54:06 [RateCDR] => 1 ) [2025-03-02 13: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-03-02 10:54:06' and `end` < '2025-03-02 13: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-03-02 13:54:18] Production.INFO: count ==1155 [2025-03-02 13:54:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:54:06 - End Time 2025-03-02 13:54:06 [2025-03-02 13:54:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591569', 'tblTempUsageDetail_20' ) start [2025-03-02 13:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591569', 'tblTempUsageDetail_20' ) end [2025-03-02 13:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591569', 'tblTempVendorCDR_20' ) start [2025-03-02 13:54:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591569', 'tblTempVendorCDR_20' ) end [2025-03-02 13:54:18] Production.INFO: ProcessCDR(1,14591569,1,1,2) [2025-03-02 13:54:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591569,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:54:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591569,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:54:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591569,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:54:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591569,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:54:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591569', 'tblTempUsageDetail_20' ) start [2025-03-02 13:54:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591569', 'tblTempUsageDetail_20' ) end [2025-03-02 13:54:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:54:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:54:21] Production.INFO: ==21767== Releasing lock... [2025-03-02 13:54:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:54:21] Production.INFO: 37.25 MB #Memory Used# [2025-03-02 13:55:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:55:05 [end_date_ymd] => 2025-03-02 13:55:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:55:05' and `end` < '2025-03-02 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-03-02 13:55:17] Production.INFO: count ==1161 [2025-03-02 13:55:17] Production.ERROR: pbx CDR StartTime 2025-03-02 10:55:05 - End Time 2025-03-02 13:55:05 [2025-03-02 13:55:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591574', 'tblTempUsageDetail_20' ) start [2025-03-02 13:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591574', 'tblTempUsageDetail_20' ) end [2025-03-02 13:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591574', 'tblTempVendorCDR_20' ) start [2025-03-02 13:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591574', 'tblTempVendorCDR_20' ) end [2025-03-02 13:55:17] Production.INFO: ProcessCDR(1,14591574,1,1,2) [2025-03-02 13:55:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591574,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:55:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591574,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:55:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591574,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:55:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591574,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:55:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591574', 'tblTempUsageDetail_20' ) start [2025-03-02 13:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591574', 'tblTempUsageDetail_20' ) end [2025-03-02 13:55:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:55:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:55:21] Production.INFO: ==21852== Releasing lock... [2025-03-02 13:55:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:55:21] Production.INFO: 37 MB #Memory Used# [2025-03-02 13:56:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:56:05 [end_date_ymd] => 2025-03-02 13:56:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:56:05' and `end` < '2025-03-02 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-03-02 13:56:17] Production.INFO: count ==1167 [2025-03-02 13:56:17] Production.ERROR: pbx CDR StartTime 2025-03-02 10:56:05 - End Time 2025-03-02 13:56:05 [2025-03-02 13:56:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591579', 'tblTempUsageDetail_20' ) start [2025-03-02 13:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591579', 'tblTempUsageDetail_20' ) end [2025-03-02 13:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591579', 'tblTempVendorCDR_20' ) start [2025-03-02 13:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591579', 'tblTempVendorCDR_20' ) end [2025-03-02 13:56:17] Production.INFO: ProcessCDR(1,14591579,1,1,2) [2025-03-02 13:56:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591579,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:56:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591579,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:56:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591579,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:56:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591579,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:56:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591579', 'tblTempUsageDetail_20' ) start [2025-03-02 13:56:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591579', 'tblTempUsageDetail_20' ) end [2025-03-02 13:56:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:56:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:56:20] Production.INFO: ==21935== Releasing lock... [2025-03-02 13:56:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:56:20] Production.INFO: 37 MB #Memory Used# [2025-03-02 13:57:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:57:06 [end_date_ymd] => 2025-03-02 13:57:06 [RateCDR] => 1 ) [2025-03-02 13: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-03-02 10:57:06' and `end` < '2025-03-02 13: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-03-02 13:57:18] Production.INFO: count ==1171 [2025-03-02 13:57:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:57:06 - End Time 2025-03-02 13:57:06 [2025-03-02 13:57:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591584', 'tblTempUsageDetail_20' ) start [2025-03-02 13:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591584', 'tblTempUsageDetail_20' ) end [2025-03-02 13:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591584', 'tblTempVendorCDR_20' ) start [2025-03-02 13:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591584', 'tblTempVendorCDR_20' ) end [2025-03-02 13:57:18] Production.INFO: ProcessCDR(1,14591584,1,1,2) [2025-03-02 13:57:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591584,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:57:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591584,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:57:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591584,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:57:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591584,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:57:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591584', 'tblTempUsageDetail_20' ) start [2025-03-02 13:57:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591584', 'tblTempUsageDetail_20' ) end [2025-03-02 13:57:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:57:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:57:21] Production.INFO: ==22012== Releasing lock... [2025-03-02 13:57:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:57:21] Production.INFO: 37.25 MB #Memory Used# [2025-03-02 13:58:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:58:05 [end_date_ymd] => 2025-03-02 13:58:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:58:05' and `end` < '2025-03-02 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-03-02 13:58:17] Production.INFO: count ==1172 [2025-03-02 13:58:17] Production.ERROR: pbx CDR StartTime 2025-03-02 10:58:05 - End Time 2025-03-02 13:58:05 [2025-03-02 13:58:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591589', 'tblTempUsageDetail_20' ) start [2025-03-02 13:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591589', 'tblTempUsageDetail_20' ) end [2025-03-02 13:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591589', 'tblTempVendorCDR_20' ) start [2025-03-02 13:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591589', 'tblTempVendorCDR_20' ) end [2025-03-02 13:58:17] Production.INFO: ProcessCDR(1,14591589,1,1,2) [2025-03-02 13:58:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591589,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:58:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591589,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:58:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591589,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:58:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591589,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:58:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591589', 'tblTempUsageDetail_20' ) start [2025-03-02 13:58:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591589', 'tblTempUsageDetail_20' ) end [2025-03-02 13:58:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:58:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:58:22] Production.INFO: ==22099== Releasing lock... [2025-03-02 13:58:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:58:22] Production.INFO: 36.75 MB #Memory Used# [2025-03-02 13:59:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 10:59:06 [end_date_ymd] => 2025-03-02 13:59:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 10:59:06' and `end` < '2025-03-02 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-03-02 13:59:18] Production.INFO: count ==1175 [2025-03-02 13:59:18] Production.ERROR: pbx CDR StartTime 2025-03-02 10:59:06 - End Time 2025-03-02 13:59:06 [2025-03-02 13:59:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 13:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591594', 'tblTempUsageDetail_20' ) start [2025-03-02 13:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591594', 'tblTempUsageDetail_20' ) end [2025-03-02 13:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591594', 'tblTempVendorCDR_20' ) start [2025-03-02 13:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591594', 'tblTempVendorCDR_20' ) end [2025-03-02 13:59:18] Production.INFO: ProcessCDR(1,14591594,1,1,2) [2025-03-02 13:59:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591594,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:59:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591594,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 13:59:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591594,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:59:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591594,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 13:59:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591594', 'tblTempUsageDetail_20' ) start [2025-03-02 13:59:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591594', 'tblTempUsageDetail_20' ) end [2025-03-02 13:59:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 13:59:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 13:59:23] Production.INFO: ==22187== Releasing lock... [2025-03-02 13:59:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 13:59:23] Production.INFO: 37 MB #Memory Used# [2025-03-02 14:00:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:00:06 [end_date_ymd] => 2025-03-02 14:00:06 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:00:06' and `end` < '2025-03-02 14: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-03-02 14:00:18] Production.INFO: count ==1180 [2025-03-02 14:00:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:00:06 - End Time 2025-03-02 14:00:06 [2025-03-02 14:00:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591600', 'tblTempUsageDetail_20' ) start [2025-03-02 14:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591600', 'tblTempUsageDetail_20' ) end [2025-03-02 14:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591600', 'tblTempVendorCDR_20' ) start [2025-03-02 14:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591600', 'tblTempVendorCDR_20' ) end [2025-03-02 14:00:18] Production.INFO: ProcessCDR(1,14591600,1,1,2) [2025-03-02 14:00:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591600,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:00:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591600,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:00:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591600,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:00:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591600,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:00:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591600', 'tblTempUsageDetail_20' ) start [2025-03-02 14:00:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591600', 'tblTempUsageDetail_20' ) end [2025-03-02 14:00:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:00:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:00:23] Production.INFO: ==22284== Releasing lock... [2025-03-02 14:00:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:00:23] Production.INFO: 37.5 MB #Memory Used# [2025-03-02 14:01:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:01:05 [end_date_ymd] => 2025-03-02 14:01:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 11:01:05' and `end` < '2025-03-02 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-03-02 14:01:17] Production.INFO: count ==1226 [2025-03-02 14:01:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:01:05 - End Time 2025-03-02 14:01:05 [2025-03-02 14:01:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591605', 'tblTempUsageDetail_20' ) start [2025-03-02 14:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591605', 'tblTempUsageDetail_20' ) end [2025-03-02 14:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591605', 'tblTempVendorCDR_20' ) start [2025-03-02 14:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591605', 'tblTempVendorCDR_20' ) end [2025-03-02 14:01:18] Production.INFO: ProcessCDR(1,14591605,1,1,2) [2025-03-02 14:01:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591605,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:01:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591605,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:01:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591605,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:01:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591605,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:01:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591605', 'tblTempUsageDetail_20' ) start [2025-03-02 14:01:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591605', 'tblTempUsageDetail_20' ) end [2025-03-02 14:01:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:01:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:01:22] Production.INFO: ==22391== Releasing lock... [2025-03-02 14:01:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:01:22] Production.INFO: 37.5 MB #Memory Used# [2025-03-02 14:02:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:02:05 [end_date_ymd] => 2025-03-02 14:02:05 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:02:05' and `end` < '2025-03-02 14: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-03-02 14:02:17] Production.INFO: count ==1227 [2025-03-02 14:02:17] Production.ERROR: pbx CDR StartTime 2025-03-02 11:02:05 - End Time 2025-03-02 14:02:05 [2025-03-02 14:02:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591610', 'tblTempUsageDetail_20' ) start [2025-03-02 14:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591610', 'tblTempUsageDetail_20' ) end [2025-03-02 14:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591610', 'tblTempVendorCDR_20' ) start [2025-03-02 14:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591610', 'tblTempVendorCDR_20' ) end [2025-03-02 14:02:17] Production.INFO: ProcessCDR(1,14591610,1,1,2) [2025-03-02 14:02:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591610,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:02:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591610,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:02:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591610,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:02:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591610,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:02:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591610', 'tblTempUsageDetail_20' ) start [2025-03-02 14:02:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591610', 'tblTempUsageDetail_20' ) end [2025-03-02 14:02:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:02:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:02:22] Production.INFO: ==22484== Releasing lock... [2025-03-02 14:02:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:02:22] Production.INFO: 37.5 MB #Memory Used# [2025-03-02 14:03:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:03:05 [end_date_ymd] => 2025-03-02 14:03:05 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:03:05' and `end` < '2025-03-02 14: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-03-02 14:03:17] Production.INFO: count ==1228 [2025-03-02 14:03:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:03:05 - End Time 2025-03-02 14:03:05 [2025-03-02 14:03:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591615', 'tblTempUsageDetail_20' ) start [2025-03-02 14:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591615', 'tblTempUsageDetail_20' ) end [2025-03-02 14:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591615', 'tblTempVendorCDR_20' ) start [2025-03-02 14:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591615', 'tblTempVendorCDR_20' ) end [2025-03-02 14:03:18] Production.INFO: ProcessCDR(1,14591615,1,1,2) [2025-03-02 14:03:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591615,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:03:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591615,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:03:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591615,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:03:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591615,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:03:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591615', 'tblTempUsageDetail_20' ) start [2025-03-02 14:03:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591615', 'tblTempUsageDetail_20' ) end [2025-03-02 14:03:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:03:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:03:22] Production.INFO: ==22610== Releasing lock... [2025-03-02 14:03:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:03:22] Production.INFO: 37.25 MB #Memory Used# [2025-03-02 14:04:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:04:05 [end_date_ymd] => 2025-03-02 14:04:05 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:04:05' and `end` < '2025-03-02 14: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-03-02 14:04:17] Production.INFO: count ==1227 [2025-03-02 14:04:17] Production.ERROR: pbx CDR StartTime 2025-03-02 11:04:05 - End Time 2025-03-02 14:04:05 [2025-03-02 14:04:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591620', 'tblTempUsageDetail_20' ) start [2025-03-02 14:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591620', 'tblTempUsageDetail_20' ) end [2025-03-02 14:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591620', 'tblTempVendorCDR_20' ) start [2025-03-02 14:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591620', 'tblTempVendorCDR_20' ) end [2025-03-02 14:04:17] Production.INFO: ProcessCDR(1,14591620,1,1,2) [2025-03-02 14:04:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591620,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:04:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591620,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:04:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591620,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:04:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591620,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:04:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591620', 'tblTempUsageDetail_20' ) start [2025-03-02 14:04:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591620', 'tblTempUsageDetail_20' ) end [2025-03-02 14:04:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:04:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:04:23] Production.INFO: ==22707== Releasing lock... [2025-03-02 14:04:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:04:23] Production.INFO: 37 MB #Memory Used# [2025-03-02 14:05:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:05:05 [end_date_ymd] => 2025-03-02 14:05:05 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:05:05' and `end` < '2025-03-02 14: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-03-02 14:05:17] Production.INFO: count ==1234 [2025-03-02 14:05:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:05:05 - End Time 2025-03-02 14:05:05 [2025-03-02 14:05:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591625', 'tblTempUsageDetail_20' ) start [2025-03-02 14:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591625', 'tblTempUsageDetail_20' ) end [2025-03-02 14:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591625', 'tblTempVendorCDR_20' ) start [2025-03-02 14:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591625', 'tblTempVendorCDR_20' ) end [2025-03-02 14:05:18] Production.INFO: ProcessCDR(1,14591625,1,1,2) [2025-03-02 14:05:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591625,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:05:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591625,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:05:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591625,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:05:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591625,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:05:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591625', 'tblTempUsageDetail_20' ) start [2025-03-02 14:05:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591625', 'tblTempUsageDetail_20' ) end [2025-03-02 14:05:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:05:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:05:21] Production.INFO: ==22787== Releasing lock... [2025-03-02 14:05:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:05:21] Production.INFO: 37.75 MB #Memory Used# [2025-03-02 14:06:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:06:05 [end_date_ymd] => 2025-03-02 14:06:05 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:06:05' and `end` < '2025-03-02 14: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-03-02 14:06:17] Production.INFO: count ==1237 [2025-03-02 14:06:17] Production.ERROR: pbx CDR StartTime 2025-03-02 11:06:05 - End Time 2025-03-02 14:06:05 [2025-03-02 14:06:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591630', 'tblTempUsageDetail_20' ) start [2025-03-02 14:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591630', 'tblTempUsageDetail_20' ) end [2025-03-02 14:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591630', 'tblTempVendorCDR_20' ) start [2025-03-02 14:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591630', 'tblTempVendorCDR_20' ) end [2025-03-02 14:06:17] Production.INFO: ProcessCDR(1,14591630,1,1,2) [2025-03-02 14:06:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591630,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:06:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591630,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:06:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591630,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:06:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591630,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:06:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591630', 'tblTempUsageDetail_20' ) start [2025-03-02 14:06:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591630', 'tblTempUsageDetail_20' ) end [2025-03-02 14:06:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:06:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:06:20] Production.INFO: ==22864== Releasing lock... [2025-03-02 14:06:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:06:20] Production.INFO: 37.5 MB #Memory Used# [2025-03-02 14:07:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:07:05 [end_date_ymd] => 2025-03-02 14:07:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 11:07:05' and `end` < '2025-03-02 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-03-02 14:07:17] Production.INFO: count ==1238 [2025-03-02 14:07:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:07:05 - End Time 2025-03-02 14:07:05 [2025-03-02 14:07:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591635', 'tblTempUsageDetail_20' ) start [2025-03-02 14:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591635', 'tblTempUsageDetail_20' ) end [2025-03-02 14:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591635', 'tblTempVendorCDR_20' ) start [2025-03-02 14:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591635', 'tblTempVendorCDR_20' ) end [2025-03-02 14:07:18] Production.INFO: ProcessCDR(1,14591635,1,1,2) [2025-03-02 14:07:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591635,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:07:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591635,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:07:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591635,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:07:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591635,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:07:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591635', 'tblTempUsageDetail_20' ) start [2025-03-02 14:07:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591635', 'tblTempUsageDetail_20' ) end [2025-03-02 14:07:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:07:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:07:23] Production.INFO: ==22938== Releasing lock... [2025-03-02 14:07:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:07:23] Production.INFO: 37.5 MB #Memory Used# [2025-03-02 14:08:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:08:05 [end_date_ymd] => 2025-03-02 14:08:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 11:08:05' and `end` < '2025-03-02 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-03-02 14:08:17] Production.INFO: count ==1239 [2025-03-02 14:08:17] Production.ERROR: pbx CDR StartTime 2025-03-02 11:08:05 - End Time 2025-03-02 14:08:05 [2025-03-02 14:08:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591640', 'tblTempUsageDetail_20' ) start [2025-03-02 14:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591640', 'tblTempUsageDetail_20' ) end [2025-03-02 14:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591640', 'tblTempVendorCDR_20' ) start [2025-03-02 14:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591640', 'tblTempVendorCDR_20' ) end [2025-03-02 14:08:17] Production.INFO: ProcessCDR(1,14591640,1,1,2) [2025-03-02 14:08:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591640,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:08:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591640,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:08:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591640,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:08:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591640,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:08:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591640', 'tblTempUsageDetail_20' ) start [2025-03-02 14:08:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591640', 'tblTempUsageDetail_20' ) end [2025-03-02 14:08:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:08:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:08:22] Production.INFO: ==23015== Releasing lock... [2025-03-02 14:08:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:08:22] Production.INFO: 37.25 MB #Memory Used# [2025-03-02 14:09:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:09:05 [end_date_ymd] => 2025-03-02 14:09:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 11:09:05' and `end` < '2025-03-02 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-03-02 14:09:17] Production.INFO: count ==1240 [2025-03-02 14:09:17] Production.ERROR: pbx CDR StartTime 2025-03-02 11:09:05 - End Time 2025-03-02 14:09:05 [2025-03-02 14:09:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591645', 'tblTempUsageDetail_20' ) start [2025-03-02 14:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591645', 'tblTempUsageDetail_20' ) end [2025-03-02 14:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591645', 'tblTempVendorCDR_20' ) start [2025-03-02 14:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591645', 'tblTempVendorCDR_20' ) end [2025-03-02 14:09:17] Production.INFO: ProcessCDR(1,14591645,1,1,2) [2025-03-02 14:09:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591645,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:09:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591645,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:09:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591645,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:09:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591645,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:09:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591645', 'tblTempUsageDetail_20' ) start [2025-03-02 14:09:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591645', 'tblTempUsageDetail_20' ) end [2025-03-02 14:09:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:09:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:09:22] Production.INFO: ==23095== Releasing lock... [2025-03-02 14:09:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:09:22] Production.INFO: 38.25 MB #Memory Used# [2025-03-02 14:10:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:10:06 [end_date_ymd] => 2025-03-02 14:10:06 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:10:06' and `end` < '2025-03-02 14: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-03-02 14:10:19] Production.INFO: count ==1241 [2025-03-02 14:10:19] Production.ERROR: pbx CDR StartTime 2025-03-02 11:10:06 - End Time 2025-03-02 14:10:06 [2025-03-02 14:10:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:10:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591651', 'tblTempUsageDetail_20' ) start [2025-03-02 14:10:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591651', 'tblTempUsageDetail_20' ) end [2025-03-02 14:10:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591651', 'tblTempVendorCDR_20' ) start [2025-03-02 14:10:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591651', 'tblTempVendorCDR_20' ) end [2025-03-02 14:10:19] Production.INFO: ProcessCDR(1,14591651,1,1,2) [2025-03-02 14:10:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591651,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:10:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591651,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:10:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591651,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:10:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591651,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:10:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591651', 'tblTempUsageDetail_20' ) start [2025-03-02 14:10:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591651', 'tblTempUsageDetail_20' ) end [2025-03-02 14:10:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:10:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:10:23] Production.INFO: ==23178== Releasing lock... [2025-03-02 14:10:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:10:23] Production.INFO: 37.25 MB #Memory Used# [2025-03-02 14:11:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:11:06 [end_date_ymd] => 2025-03-02 14:11:06 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:11:06' and `end` < '2025-03-02 14: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-03-02 14:11:18] Production.INFO: count ==1255 [2025-03-02 14:11:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:11:06 - End Time 2025-03-02 14:11:06 [2025-03-02 14:11:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:11:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591656', 'tblTempUsageDetail_20' ) start [2025-03-02 14:11:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591656', 'tblTempUsageDetail_20' ) end [2025-03-02 14:11:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591656', 'tblTempVendorCDR_20' ) start [2025-03-02 14:11:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591656', 'tblTempVendorCDR_20' ) end [2025-03-02 14:11:18] Production.INFO: ProcessCDR(1,14591656,1,1,2) [2025-03-02 14:11:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591656,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:11:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591656,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:11:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591656,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:11:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591656,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:11:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591656', 'tblTempUsageDetail_20' ) start [2025-03-02 14:11:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591656', 'tblTempUsageDetail_20' ) end [2025-03-02 14:11:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:11:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:11:22] Production.INFO: ==23257== Releasing lock... [2025-03-02 14:11:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:11:22] Production.INFO: 37.5 MB #Memory Used# [2025-03-02 14:12:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:12:06 [end_date_ymd] => 2025-03-02 14:12:06 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:12:06' and `end` < '2025-03-02 14: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-03-02 14:12:18] Production.INFO: count ==1255 [2025-03-02 14:12:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:12:06 - End Time 2025-03-02 14:12:06 [2025-03-02 14:12:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591661', 'tblTempUsageDetail_20' ) start [2025-03-02 14:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591661', 'tblTempUsageDetail_20' ) end [2025-03-02 14:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591661', 'tblTempVendorCDR_20' ) start [2025-03-02 14:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591661', 'tblTempVendorCDR_20' ) end [2025-03-02 14:12:18] Production.INFO: ProcessCDR(1,14591661,1,1,2) [2025-03-02 14:12:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591661,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:12:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591661,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:12:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591661,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:12:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591661,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:12:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591661', 'tblTempUsageDetail_20' ) start [2025-03-02 14:12:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591661', 'tblTempUsageDetail_20' ) end [2025-03-02 14:12:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:12:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:12:21] Production.INFO: ==23336== Releasing lock... [2025-03-02 14:12:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:12:21] Production.INFO: 37.5 MB #Memory Used# [2025-03-02 14:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:13:05 [end_date_ymd] => 2025-03-02 14:13:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 11:13:05' and `end` < '2025-03-02 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-03-02 14:13:17] Production.INFO: count ==1248 [2025-03-02 14:13:17] Production.ERROR: pbx CDR StartTime 2025-03-02 11:13:05 - End Time 2025-03-02 14:13:05 [2025-03-02 14:13:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591666', 'tblTempUsageDetail_20' ) start [2025-03-02 14:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591666', 'tblTempUsageDetail_20' ) end [2025-03-02 14:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591666', 'tblTempVendorCDR_20' ) start [2025-03-02 14:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591666', 'tblTempVendorCDR_20' ) end [2025-03-02 14:13:18] Production.INFO: ProcessCDR(1,14591666,1,1,2) [2025-03-02 14:13:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591666,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:13:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591666,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:13:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591666,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:13:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591666,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:13:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591666', 'tblTempUsageDetail_20' ) start [2025-03-02 14:13:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591666', 'tblTempUsageDetail_20' ) end [2025-03-02 14:13:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:13:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:13:22] Production.INFO: ==23415== Releasing lock... [2025-03-02 14:13:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:13:22] Production.INFO: 38 MB #Memory Used# [2025-03-02 14:14:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:14:06 [end_date_ymd] => 2025-03-02 14:14:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 11:14:06' and `end` < '2025-03-02 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-03-02 14:14:18] Production.INFO: count ==1243 [2025-03-02 14:14:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:14:06 - End Time 2025-03-02 14:14:06 [2025-03-02 14:14:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591671', 'tblTempUsageDetail_20' ) start [2025-03-02 14:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591671', 'tblTempUsageDetail_20' ) end [2025-03-02 14:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591671', 'tblTempVendorCDR_20' ) start [2025-03-02 14:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591671', 'tblTempVendorCDR_20' ) end [2025-03-02 14:14:18] Production.INFO: ProcessCDR(1,14591671,1,1,2) [2025-03-02 14:14:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591671,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:14:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591671,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:14:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591671,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:14:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591671,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:14:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591671', 'tblTempUsageDetail_20' ) start [2025-03-02 14:14:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591671', 'tblTempUsageDetail_20' ) end [2025-03-02 14:14:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:14:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:14:23] Production.INFO: ==23499== Releasing lock... [2025-03-02 14:14:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:14:23] Production.INFO: 37.5 MB #Memory Used# [2025-03-02 14:15:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:15:06 [end_date_ymd] => 2025-03-02 14:15:06 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:15:06' and `end` < '2025-03-02 14: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-03-02 14:15:18] Production.INFO: count ==1242 [2025-03-02 14:15:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:15:06 - End Time 2025-03-02 14:15:06 [2025-03-02 14:15:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591676', 'tblTempUsageDetail_20' ) start [2025-03-02 14:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591676', 'tblTempUsageDetail_20' ) end [2025-03-02 14:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591676', 'tblTempVendorCDR_20' ) start [2025-03-02 14:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591676', 'tblTempVendorCDR_20' ) end [2025-03-02 14:15:18] Production.INFO: ProcessCDR(1,14591676,1,1,2) [2025-03-02 14:15:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591676,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:15:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591676,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:15:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591676,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:15:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591676,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:15:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591676', 'tblTempUsageDetail_20' ) start [2025-03-02 14:15:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591676', 'tblTempUsageDetail_20' ) end [2025-03-02 14:15:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:15:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:15:21] Production.INFO: ==23579== Releasing lock... [2025-03-02 14:15:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:15:21] Production.INFO: 38 MB #Memory Used# [2025-03-02 14:16:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:16:05 [end_date_ymd] => 2025-03-02 14:16:05 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:16:05' and `end` < '2025-03-02 14: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-03-02 14:16:17] Production.INFO: count ==1242 [2025-03-02 14:16:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:16:05 - End Time 2025-03-02 14:16:05 [2025-03-02 14:16:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591681', 'tblTempUsageDetail_20' ) start [2025-03-02 14:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591681', 'tblTempUsageDetail_20' ) end [2025-03-02 14:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591681', 'tblTempVendorCDR_20' ) start [2025-03-02 14:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591681', 'tblTempVendorCDR_20' ) end [2025-03-02 14:16:18] Production.INFO: ProcessCDR(1,14591681,1,1,2) [2025-03-02 14:16:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591681,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:16:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591681,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:16:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591681,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:16:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591681,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591681', 'tblTempUsageDetail_20' ) start [2025-03-02 14:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591681', 'tblTempUsageDetail_20' ) end [2025-03-02 14:16:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:16:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:16:21] Production.INFO: ==23683== Releasing lock... [2025-03-02 14:16:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:16:21] Production.INFO: 38 MB #Memory Used# [2025-03-02 14:17:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:17:05 [end_date_ymd] => 2025-03-02 14:17:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 11:17:05' and `end` < '2025-03-02 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-03-02 14:17:17] Production.INFO: count ==1242 [2025-03-02 14:17:17] Production.ERROR: pbx CDR StartTime 2025-03-02 11:17:05 - End Time 2025-03-02 14:17:05 [2025-03-02 14:17:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591686', 'tblTempUsageDetail_20' ) start [2025-03-02 14:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591686', 'tblTempUsageDetail_20' ) end [2025-03-02 14:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591686', 'tblTempVendorCDR_20' ) start [2025-03-02 14:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591686', 'tblTempVendorCDR_20' ) end [2025-03-02 14:17:17] Production.INFO: ProcessCDR(1,14591686,1,1,2) [2025-03-02 14:17:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591686,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:17:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591686,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:17:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591686,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:17:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591686,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591686', 'tblTempUsageDetail_20' ) start [2025-03-02 14:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591686', 'tblTempUsageDetail_20' ) end [2025-03-02 14:17:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:17:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:17:21] Production.INFO: ==23779== Releasing lock... [2025-03-02 14:17:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:17:21] Production.INFO: 38 MB #Memory Used# [2025-03-02 14:18:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:18:05 [end_date_ymd] => 2025-03-02 14:18:05 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:18:05' and `end` < '2025-03-02 14: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-03-02 14:18:18] Production.INFO: count ==1244 [2025-03-02 14:18:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:18:05 - End Time 2025-03-02 14:18:05 [2025-03-02 14:18:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591691', 'tblTempUsageDetail_20' ) start [2025-03-02 14:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591691', 'tblTempUsageDetail_20' ) end [2025-03-02 14:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591691', 'tblTempVendorCDR_20' ) start [2025-03-02 14:18:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591691', 'tblTempVendorCDR_20' ) end [2025-03-02 14:18:18] Production.INFO: ProcessCDR(1,14591691,1,1,2) [2025-03-02 14:18:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591691,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:18:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591691,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:18:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591691,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:18:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591691,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591691', 'tblTempUsageDetail_20' ) start [2025-03-02 14:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591691', 'tblTempUsageDetail_20' ) end [2025-03-02 14:18:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:18:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:18:21] Production.INFO: ==23919== Releasing lock... [2025-03-02 14:18:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:18:21] Production.INFO: 38.25 MB #Memory Used# [2025-03-02 14:19:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:19:05 [end_date_ymd] => 2025-03-02 14:19:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 11:19:05' and `end` < '2025-03-02 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-03-02 14:19:17] Production.INFO: count ==1256 [2025-03-02 14:19:17] Production.ERROR: pbx CDR StartTime 2025-03-02 11:19:05 - End Time 2025-03-02 14:19:05 [2025-03-02 14:19:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591696', 'tblTempUsageDetail_20' ) start [2025-03-02 14:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591696', 'tblTempUsageDetail_20' ) end [2025-03-02 14:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591696', 'tblTempVendorCDR_20' ) start [2025-03-02 14:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591696', 'tblTempVendorCDR_20' ) end [2025-03-02 14:19:17] Production.INFO: ProcessCDR(1,14591696,1,1,2) [2025-03-02 14:19:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591696,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:19:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591696,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:19:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591696,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:19:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591696,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:19:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591696', 'tblTempUsageDetail_20' ) start [2025-03-02 14:19:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591696', 'tblTempUsageDetail_20' ) end [2025-03-02 14:19:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:19:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:19:21] Production.INFO: ==24010== Releasing lock... [2025-03-02 14:19:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:19:21] Production.INFO: 37.75 MB #Memory Used# [2025-03-02 14:20:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:20:06 [end_date_ymd] => 2025-03-02 14:20:06 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:20:06' and `end` < '2025-03-02 14: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-03-02 14:20:18] Production.INFO: count ==1277 [2025-03-02 14:20:19] Production.ERROR: pbx CDR StartTime 2025-03-02 11:20:06 - End Time 2025-03-02 14:20:06 [2025-03-02 14:20:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:20:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591702', 'tblTempUsageDetail_20' ) start [2025-03-02 14:20:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591702', 'tblTempUsageDetail_20' ) end [2025-03-02 14:20:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591702', 'tblTempVendorCDR_20' ) start [2025-03-02 14:20:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591702', 'tblTempVendorCDR_20' ) end [2025-03-02 14:20:19] Production.INFO: ProcessCDR(1,14591702,1,1,2) [2025-03-02 14:20:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591702,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:20:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591702,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:20:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591702,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:20:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591702,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591702', 'tblTempUsageDetail_20' ) start [2025-03-02 14:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591702', 'tblTempUsageDetail_20' ) end [2025-03-02 14:20:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:20:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:20:22] Production.INFO: ==24103== Releasing lock... [2025-03-02 14:20:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:20:22] Production.INFO: 37.75 MB #Memory Used# [2025-03-02 14:21:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:21:05 [end_date_ymd] => 2025-03-02 14:21:05 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:21:05' and `end` < '2025-03-02 14: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-03-02 14:21:17] Production.INFO: count ==1303 [2025-03-02 14:21:17] Production.ERROR: pbx CDR StartTime 2025-03-02 11:21:05 - End Time 2025-03-02 14:21:05 [2025-03-02 14:21:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591707', 'tblTempUsageDetail_20' ) start [2025-03-02 14:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591707', 'tblTempUsageDetail_20' ) end [2025-03-02 14:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591707', 'tblTempVendorCDR_20' ) start [2025-03-02 14:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591707', 'tblTempVendorCDR_20' ) end [2025-03-02 14:21:17] Production.INFO: ProcessCDR(1,14591707,1,1,2) [2025-03-02 14:21:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591707,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:21:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591707,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:21:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591707,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:21:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591707,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:21:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591707', 'tblTempUsageDetail_20' ) start [2025-03-02 14:21:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591707', 'tblTempUsageDetail_20' ) end [2025-03-02 14:21:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:21:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:21:20] Production.INFO: ==24193== Releasing lock... [2025-03-02 14:21:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:21:20] Production.INFO: 38 MB #Memory Used# [2025-03-02 14:22:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:22:06 [end_date_ymd] => 2025-03-02 14:22:06 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:22:06' and `end` < '2025-03-02 14: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-03-02 14:22:18] Production.INFO: count ==1318 [2025-03-02 14:22:19] Production.ERROR: pbx CDR StartTime 2025-03-02 11:22:06 - End Time 2025-03-02 14:22:06 [2025-03-02 14:22:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:22:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591712', 'tblTempUsageDetail_20' ) start [2025-03-02 14:22:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591712', 'tblTempUsageDetail_20' ) end [2025-03-02 14:22:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591712', 'tblTempVendorCDR_20' ) start [2025-03-02 14:22:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591712', 'tblTempVendorCDR_20' ) end [2025-03-02 14:22:19] Production.INFO: ProcessCDR(1,14591712,1,1,2) [2025-03-02 14:22:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591712,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:22:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591712,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:22:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591712,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:22:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591712,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:22:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591712', 'tblTempUsageDetail_20' ) start [2025-03-02 14:22:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591712', 'tblTempUsageDetail_20' ) end [2025-03-02 14:22:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:22:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:22:24] Production.INFO: ==24293== Releasing lock... [2025-03-02 14:22:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:22:24] Production.INFO: 38.25 MB #Memory Used# [2025-03-02 14:23:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:23:05 [end_date_ymd] => 2025-03-02 14:23:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 11:23:05' and `end` < '2025-03-02 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-03-02 14:23:17] Production.INFO: count ==1307 [2025-03-02 14:23:17] Production.ERROR: pbx CDR StartTime 2025-03-02 11:23:05 - End Time 2025-03-02 14:23:05 [2025-03-02 14:23:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591717', 'tblTempUsageDetail_20' ) start [2025-03-02 14:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591717', 'tblTempUsageDetail_20' ) end [2025-03-02 14:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591717', 'tblTempVendorCDR_20' ) start [2025-03-02 14:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591717', 'tblTempVendorCDR_20' ) end [2025-03-02 14:23:17] Production.INFO: ProcessCDR(1,14591717,1,1,2) [2025-03-02 14:23:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591717,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:23:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591717,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:23:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591717,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:23:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591717,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:23:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591717', 'tblTempUsageDetail_20' ) start [2025-03-02 14:23:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591717', 'tblTempUsageDetail_20' ) end [2025-03-02 14:23:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:23:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:23:21] Production.INFO: ==24405== Releasing lock... [2025-03-02 14:23:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:23:21] Production.INFO: 38 MB #Memory Used# [2025-03-02 14:24:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:24:05 [end_date_ymd] => 2025-03-02 14:24:05 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:24:05' and `end` < '2025-03-02 14: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-03-02 14:24:17] Production.INFO: count ==1305 [2025-03-02 14:24:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:24:05 - End Time 2025-03-02 14:24:05 [2025-03-02 14:24:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591722', 'tblTempUsageDetail_20' ) start [2025-03-02 14:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591722', 'tblTempUsageDetail_20' ) end [2025-03-02 14:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591722', 'tblTempVendorCDR_20' ) start [2025-03-02 14:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591722', 'tblTempVendorCDR_20' ) end [2025-03-02 14:24:18] Production.INFO: ProcessCDR(1,14591722,1,1,2) [2025-03-02 14:24:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591722,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:24:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591722,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:24:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591722,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:24:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591722,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591722', 'tblTempUsageDetail_20' ) start [2025-03-02 14:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591722', 'tblTempUsageDetail_20' ) end [2025-03-02 14:24:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:24:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:24:21] Production.INFO: ==24507== Releasing lock... [2025-03-02 14:24:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:24:21] Production.INFO: 37.5 MB #Memory Used# [2025-03-02 14:25:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:25:05 [end_date_ymd] => 2025-03-02 14:25:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 11:25:05' and `end` < '2025-03-02 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-03-02 14:25:17] Production.INFO: count ==1303 [2025-03-02 14:25:17] Production.ERROR: pbx CDR StartTime 2025-03-02 11:25:05 - End Time 2025-03-02 14:25:05 [2025-03-02 14:25:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591727', 'tblTempUsageDetail_20' ) start [2025-03-02 14:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591727', 'tblTempUsageDetail_20' ) end [2025-03-02 14:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591727', 'tblTempVendorCDR_20' ) start [2025-03-02 14:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591727', 'tblTempVendorCDR_20' ) end [2025-03-02 14:25:17] Production.INFO: ProcessCDR(1,14591727,1,1,2) [2025-03-02 14:25:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591727,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:25:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591727,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:25:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591727,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:25:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591727,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591727', 'tblTempUsageDetail_20' ) start [2025-03-02 14:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591727', 'tblTempUsageDetail_20' ) end [2025-03-02 14:25:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:25:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:25:21] Production.INFO: ==24606== Releasing lock... [2025-03-02 14:25:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:25:21] Production.INFO: 37.75 MB #Memory Used# [2025-03-02 14:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:26:05 [end_date_ymd] => 2025-03-02 14:26:05 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:26:05' and `end` < '2025-03-02 14: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-03-02 14:26:18] Production.INFO: count ==1292 [2025-03-02 14:26:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:26:05 - End Time 2025-03-02 14:26:05 [2025-03-02 14:26:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591732', 'tblTempUsageDetail_20' ) start [2025-03-02 14:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591732', 'tblTempUsageDetail_20' ) end [2025-03-02 14:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591732', 'tblTempVendorCDR_20' ) start [2025-03-02 14:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591732', 'tblTempVendorCDR_20' ) end [2025-03-02 14:26:18] Production.INFO: ProcessCDR(1,14591732,1,1,2) [2025-03-02 14:26:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591732,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:26:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591732,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:26:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591732,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:26:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591732,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:26:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591732', 'tblTempUsageDetail_20' ) start [2025-03-02 14:26:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591732', 'tblTempUsageDetail_20' ) end [2025-03-02 14:26:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:26:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:26:21] Production.INFO: ==24714== Releasing lock... [2025-03-02 14:26:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:26:21] Production.INFO: 38 MB #Memory Used# [2025-03-02 14:27:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:27:05 [end_date_ymd] => 2025-03-02 14:27:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 11:27:05' and `end` < '2025-03-02 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-03-02 14:27:17] Production.INFO: count ==1289 [2025-03-02 14:27:17] Production.ERROR: pbx CDR StartTime 2025-03-02 11:27:05 - End Time 2025-03-02 14:27:05 [2025-03-02 14:27:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591736', 'tblTempUsageDetail_20' ) start [2025-03-02 14:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591736', 'tblTempUsageDetail_20' ) end [2025-03-02 14:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591736', 'tblTempVendorCDR_20' ) start [2025-03-02 14:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591736', 'tblTempVendorCDR_20' ) end [2025-03-02 14:27:17] Production.INFO: ProcessCDR(1,14591736,1,1,2) [2025-03-02 14:27:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591736,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:27:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591736,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:27:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591736,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:27:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591736,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:27:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591736', 'tblTempUsageDetail_20' ) start [2025-03-02 14:27:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591736', 'tblTempUsageDetail_20' ) end [2025-03-02 14:27:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:27:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:27:22] Production.INFO: ==24814== Releasing lock... [2025-03-02 14:27:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:27:22] Production.INFO: 38 MB #Memory Used# [2025-03-02 14:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:28:05 [end_date_ymd] => 2025-03-02 14:28:05 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:28:05' and `end` < '2025-03-02 14: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-03-02 14:28:17] Production.INFO: count ==1294 [2025-03-02 14:28:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:28:05 - End Time 2025-03-02 14:28:05 [2025-03-02 14:28:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591742', 'tblTempUsageDetail_20' ) start [2025-03-02 14:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591742', 'tblTempUsageDetail_20' ) end [2025-03-02 14:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591742', 'tblTempVendorCDR_20' ) start [2025-03-02 14:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591742', 'tblTempVendorCDR_20' ) end [2025-03-02 14:28:18] Production.INFO: ProcessCDR(1,14591742,1,1,2) [2025-03-02 14:28:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591742,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:28:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591742,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:28:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591742,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:28:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591742,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:28:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591742', 'tblTempUsageDetail_20' ) start [2025-03-02 14:28:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591742', 'tblTempUsageDetail_20' ) end [2025-03-02 14:28:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:28:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:28:22] Production.INFO: ==24916== Releasing lock... [2025-03-02 14:28:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:28:22] Production.INFO: 38 MB #Memory Used# [2025-03-02 14:29:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:29:05 [end_date_ymd] => 2025-03-02 14:29:05 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:29:05' and `end` < '2025-03-02 14: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-03-02 14:29:17] Production.INFO: count ==1295 [2025-03-02 14:29:17] Production.ERROR: pbx CDR StartTime 2025-03-02 11:29:05 - End Time 2025-03-02 14:29:05 [2025-03-02 14:29:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591747', 'tblTempUsageDetail_20' ) start [2025-03-02 14:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591747', 'tblTempUsageDetail_20' ) end [2025-03-02 14:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591747', 'tblTempVendorCDR_20' ) start [2025-03-02 14:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591747', 'tblTempVendorCDR_20' ) end [2025-03-02 14:29:17] Production.INFO: ProcessCDR(1,14591747,1,1,2) [2025-03-02 14:29:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591747,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:29:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591747,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:29:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591747,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:29:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591747,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:29:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591747', 'tblTempUsageDetail_20' ) start [2025-03-02 14:29:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591747', 'tblTempUsageDetail_20' ) end [2025-03-02 14:29:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:29:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:29:22] Production.INFO: ==25038== Releasing lock... [2025-03-02 14:29:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:29:22] Production.INFO: 38.25 MB #Memory Used# [2025-03-02 14:30:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:30:06 [end_date_ymd] => 2025-03-02 14:30:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 11:30:06' and `end` < '2025-03-02 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-03-02 14:30:18] Production.INFO: count ==1296 [2025-03-02 14:30:19] Production.ERROR: pbx CDR StartTime 2025-03-02 11:30:06 - End Time 2025-03-02 14:30:06 [2025-03-02 14:30:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:30:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591753', 'tblTempUsageDetail_20' ) start [2025-03-02 14:30:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591753', 'tblTempUsageDetail_20' ) end [2025-03-02 14:30:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591753', 'tblTempVendorCDR_20' ) start [2025-03-02 14:30:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591753', 'tblTempVendorCDR_20' ) end [2025-03-02 14:30:19] Production.INFO: ProcessCDR(1,14591753,1,1,2) [2025-03-02 14:30:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591753,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:30:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591753,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:30:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591753,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:30:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591753,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:30:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591753', 'tblTempUsageDetail_20' ) start [2025-03-02 14:30:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591753', 'tblTempUsageDetail_20' ) end [2025-03-02 14:30:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:30:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:30:22] Production.INFO: ==25154== Releasing lock... [2025-03-02 14:30:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:30:22] Production.INFO: 38.25 MB #Memory Used# [2025-03-02 14:31:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:31:05 [end_date_ymd] => 2025-03-02 14:31:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 11:31:05' and `end` < '2025-03-02 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-03-02 14:31:17] Production.INFO: count ==1324 [2025-03-02 14:31:17] Production.ERROR: pbx CDR StartTime 2025-03-02 11:31:05 - End Time 2025-03-02 14:31:05 [2025-03-02 14:31:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591758', 'tblTempUsageDetail_20' ) start [2025-03-02 14:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591758', 'tblTempUsageDetail_20' ) end [2025-03-02 14:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591758', 'tblTempVendorCDR_20' ) start [2025-03-02 14:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591758', 'tblTempVendorCDR_20' ) end [2025-03-02 14:31:17] Production.INFO: ProcessCDR(1,14591758,1,1,2) [2025-03-02 14:31:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591758,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:31:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591758,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:31:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591758,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:31:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591758,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:31:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591758', 'tblTempUsageDetail_20' ) start [2025-03-02 14:31:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591758', 'tblTempUsageDetail_20' ) end [2025-03-02 14:31:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:31:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:31:22] Production.INFO: ==25256== Releasing lock... [2025-03-02 14:31:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:31:22] Production.INFO: 37.75 MB #Memory Used# [2025-03-02 14:32:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:32:05 [end_date_ymd] => 2025-03-02 14:32:05 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:32:05' and `end` < '2025-03-02 14: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-03-02 14:32:17] Production.INFO: count ==1324 [2025-03-02 14:32:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:32:05 - End Time 2025-03-02 14:32:05 [2025-03-02 14:32:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:32:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591763', 'tblTempUsageDetail_20' ) start [2025-03-02 14:32:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591763', 'tblTempUsageDetail_20' ) end [2025-03-02 14:32:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591763', 'tblTempVendorCDR_20' ) start [2025-03-02 14:32:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591763', 'tblTempVendorCDR_20' ) end [2025-03-02 14:32:18] Production.INFO: ProcessCDR(1,14591763,1,1,2) [2025-03-02 14:32:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591763,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:32:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591763,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:32:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591763,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:32:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591763,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:32:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591763', 'tblTempUsageDetail_20' ) start [2025-03-02 14:32:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591763', 'tblTempUsageDetail_20' ) end [2025-03-02 14:32:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:32:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:32:21] Production.INFO: ==25359== Releasing lock... [2025-03-02 14:32:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:32:21] Production.INFO: 37.75 MB #Memory Used# [2025-03-02 14:33:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:33:05 [end_date_ymd] => 2025-03-02 14:33:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 11:33:05' and `end` < '2025-03-02 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-03-02 14:33:17] Production.INFO: count ==1323 [2025-03-02 14:33:17] Production.ERROR: pbx CDR StartTime 2025-03-02 11:33:05 - End Time 2025-03-02 14:33:05 [2025-03-02 14:33:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591768', 'tblTempUsageDetail_20' ) start [2025-03-02 14:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591768', 'tblTempUsageDetail_20' ) end [2025-03-02 14:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591768', 'tblTempVendorCDR_20' ) start [2025-03-02 14:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591768', 'tblTempVendorCDR_20' ) end [2025-03-02 14:33:17] Production.INFO: ProcessCDR(1,14591768,1,1,2) [2025-03-02 14:33:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591768,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:33:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591768,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:33:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591768,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:33:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591768,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:33:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591768', 'tblTempUsageDetail_20' ) start [2025-03-02 14:33:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591768', 'tblTempUsageDetail_20' ) end [2025-03-02 14:33:20] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:33:20] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:33:20] Production.INFO: ==25463== Releasing lock... [2025-03-02 14:33:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:33:20] Production.INFO: 37.75 MB #Memory Used# [2025-03-02 14:34:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:34:06 [end_date_ymd] => 2025-03-02 14:34:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 11:34:06' and `end` < '2025-03-02 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-03-02 14:34:18] Production.INFO: count ==1322 [2025-03-02 14:34:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:34:06 - End Time 2025-03-02 14:34:06 [2025-03-02 14:34:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591773', 'tblTempUsageDetail_20' ) start [2025-03-02 14:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591773', 'tblTempUsageDetail_20' ) end [2025-03-02 14:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591773', 'tblTempVendorCDR_20' ) start [2025-03-02 14:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591773', 'tblTempVendorCDR_20' ) end [2025-03-02 14:34:18] Production.INFO: ProcessCDR(1,14591773,1,1,2) [2025-03-02 14:34:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591773,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:34:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591773,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:34:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591773,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:34:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591773,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:34:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591773', 'tblTempUsageDetail_20' ) start [2025-03-02 14:34:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591773', 'tblTempUsageDetail_20' ) end [2025-03-02 14:34:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:34:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:34:21] Production.INFO: ==25612== Releasing lock... [2025-03-02 14:34:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:34:21] Production.INFO: 38 MB #Memory Used# [2025-03-02 14:35:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:35:05 [end_date_ymd] => 2025-03-02 14:35:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 11:35:05' and `end` < '2025-03-02 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-03-02 14:35:17] Production.INFO: count ==1325 [2025-03-02 14:35:17] Production.ERROR: pbx CDR StartTime 2025-03-02 11:35:05 - End Time 2025-03-02 14:35:05 [2025-03-02 14:35:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591778', 'tblTempUsageDetail_20' ) start [2025-03-02 14:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591778', 'tblTempUsageDetail_20' ) end [2025-03-02 14:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591778', 'tblTempVendorCDR_20' ) start [2025-03-02 14:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591778', 'tblTempVendorCDR_20' ) end [2025-03-02 14:35:17] Production.INFO: ProcessCDR(1,14591778,1,1,2) [2025-03-02 14:35:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591778,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:35:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591778,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:35:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591778,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:35:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591778,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:35:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591778', 'tblTempUsageDetail_20' ) start [2025-03-02 14:35:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591778', 'tblTempUsageDetail_20' ) end [2025-03-02 14:35:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:35:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:35:21] Production.INFO: ==25722== Releasing lock... [2025-03-02 14:35:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:35:21] Production.INFO: 37.75 MB #Memory Used# [2025-03-02 14:36:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:36:05 [end_date_ymd] => 2025-03-02 14:36:05 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:36:05' and `end` < '2025-03-02 14: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-03-02 14:36:17] Production.INFO: count ==1319 [2025-03-02 14:36:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:36:05 - End Time 2025-03-02 14:36:05 [2025-03-02 14:36:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:36:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591783', 'tblTempUsageDetail_20' ) start [2025-03-02 14:36:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591783', 'tblTempUsageDetail_20' ) end [2025-03-02 14:36:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591783', 'tblTempVendorCDR_20' ) start [2025-03-02 14:36:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591783', 'tblTempVendorCDR_20' ) end [2025-03-02 14:36:18] Production.INFO: ProcessCDR(1,14591783,1,1,2) [2025-03-02 14:36:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591783,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:36:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591783,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:36:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591783,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:36:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591783,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:36:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591783', 'tblTempUsageDetail_20' ) start [2025-03-02 14:36:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591783', 'tblTempUsageDetail_20' ) end [2025-03-02 14:36:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:36:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:36:23] Production.INFO: ==25799== Releasing lock... [2025-03-02 14:36:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:36:23] Production.INFO: 38.5 MB #Memory Used# [2025-03-02 14:37:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:37:06 [end_date_ymd] => 2025-03-02 14:37:06 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:37:06' and `end` < '2025-03-02 14: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-03-02 14:37:18] Production.INFO: count ==1381 [2025-03-02 14:37:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:37:06 - End Time 2025-03-02 14:37:06 [2025-03-02 14:37:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591788', 'tblTempUsageDetail_20' ) start [2025-03-02 14:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591788', 'tblTempUsageDetail_20' ) end [2025-03-02 14:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591788', 'tblTempVendorCDR_20' ) start [2025-03-02 14:37:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591788', 'tblTempVendorCDR_20' ) end [2025-03-02 14:37:18] Production.INFO: ProcessCDR(1,14591788,1,1,2) [2025-03-02 14:37:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591788,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:37:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591788,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:37:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591788,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:37:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591788,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:37:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591788', 'tblTempUsageDetail_20' ) start [2025-03-02 14:37:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591788', 'tblTempUsageDetail_20' ) end [2025-03-02 14:37:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:37:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:37:23] Production.INFO: ==25906== Releasing lock... [2025-03-02 14:37:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:37:23] Production.INFO: 38.5 MB #Memory Used# [2025-03-02 14:38:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:38:05 [end_date_ymd] => 2025-03-02 14:38:05 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:38:05' and `end` < '2025-03-02 14: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-03-02 14:38:17] Production.INFO: count ==1417 [2025-03-02 14:38:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:38:05 - End Time 2025-03-02 14:38:05 [2025-03-02 14:38:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591793', 'tblTempUsageDetail_20' ) start [2025-03-02 14:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591793', 'tblTempUsageDetail_20' ) end [2025-03-02 14:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591793', 'tblTempVendorCDR_20' ) start [2025-03-02 14:38:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591793', 'tblTempVendorCDR_20' ) end [2025-03-02 14:38:18] Production.INFO: ProcessCDR(1,14591793,1,1,2) [2025-03-02 14:38:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591793,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:38:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591793,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:38:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591793,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:38:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591793,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591793', 'tblTempUsageDetail_20' ) start [2025-03-02 14:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591793', 'tblTempUsageDetail_20' ) end [2025-03-02 14:38:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:38:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:38:21] Production.INFO: ==25999== Releasing lock... [2025-03-02 14:38:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:38:21] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 14:39:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:39:06 [end_date_ymd] => 2025-03-02 14:39:06 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:39:06' and `end` < '2025-03-02 14: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-03-02 14:39:18] Production.INFO: count ==1495 [2025-03-02 14:39:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:39:06 - End Time 2025-03-02 14:39:06 [2025-03-02 14:39:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591798', 'tblTempUsageDetail_20' ) start [2025-03-02 14:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591798', 'tblTempUsageDetail_20' ) end [2025-03-02 14:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591798', 'tblTempVendorCDR_20' ) start [2025-03-02 14:39:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591798', 'tblTempVendorCDR_20' ) end [2025-03-02 14:39:18] Production.INFO: ProcessCDR(1,14591798,1,1,2) [2025-03-02 14:39:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591798,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:39:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591798,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:39:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591798,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:39:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591798,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:39:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591798', 'tblTempUsageDetail_20' ) start [2025-03-02 14:39:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591798', 'tblTempUsageDetail_20' ) end [2025-03-02 14:39:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:39:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:39:23] Production.INFO: ==26094== Releasing lock... [2025-03-02 14:39:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:39:23] Production.INFO: 39.25 MB #Memory Used# [2025-03-02 14:40:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:40:06 [end_date_ymd] => 2025-03-02 14:40:06 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:40:06' and `end` < '2025-03-02 14: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-03-02 14:40:18] Production.INFO: count ==1528 [2025-03-02 14:40:19] Production.ERROR: pbx CDR StartTime 2025-03-02 11:40:06 - End Time 2025-03-02 14:40:06 [2025-03-02 14:40:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591804', 'tblTempUsageDetail_20' ) start [2025-03-02 14:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591804', 'tblTempUsageDetail_20' ) end [2025-03-02 14:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591804', 'tblTempVendorCDR_20' ) start [2025-03-02 14:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591804', 'tblTempVendorCDR_20' ) end [2025-03-02 14:40:19] Production.INFO: ProcessCDR(1,14591804,1,1,2) [2025-03-02 14:40:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591804,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:40:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591804,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:40:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591804,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:40:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591804,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:40:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591804', 'tblTempUsageDetail_20' ) start [2025-03-02 14:40:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591804', 'tblTempUsageDetail_20' ) end [2025-03-02 14:40:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:40:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:40:22] Production.INFO: ==26181== Releasing lock... [2025-03-02 14:40:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:40:22] Production.INFO: 39.5 MB #Memory Used# [2025-03-02 14:41:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:41:06 [end_date_ymd] => 2025-03-02 14:41:06 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:41:06' and `end` < '2025-03-02 14: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-03-02 14:41:18] Production.INFO: count ==1588 [2025-03-02 14:41:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:41:06 - End Time 2025-03-02 14:41:06 [2025-03-02 14:41:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591809', 'tblTempUsageDetail_20' ) start [2025-03-02 14:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591809', 'tblTempUsageDetail_20' ) end [2025-03-02 14:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591809', 'tblTempVendorCDR_20' ) start [2025-03-02 14:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591809', 'tblTempVendorCDR_20' ) end [2025-03-02 14:41:18] Production.INFO: ProcessCDR(1,14591809,1,1,2) [2025-03-02 14:41:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591809,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:41:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591809,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:41:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591809,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:41:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591809,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:41:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591809', 'tblTempUsageDetail_20' ) start [2025-03-02 14:41:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591809', 'tblTempUsageDetail_20' ) end [2025-03-02 14:41:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:41:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:41:23] Production.INFO: ==26283== Releasing lock... [2025-03-02 14:41:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:41:23] Production.INFO: 40 MB #Memory Used# [2025-03-02 14:42:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:42:05 [end_date_ymd] => 2025-03-02 14:42:05 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:42:05' and `end` < '2025-03-02 14: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-03-02 14:42:17] Production.INFO: count ==1733 [2025-03-02 14:42:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:42:05 - End Time 2025-03-02 14:42:05 [2025-03-02 14:42:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591814', 'tblTempUsageDetail_20' ) start [2025-03-02 14:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591814', 'tblTempUsageDetail_20' ) end [2025-03-02 14:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591814', 'tblTempVendorCDR_20' ) start [2025-03-02 14:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591814', 'tblTempVendorCDR_20' ) end [2025-03-02 14:42:18] Production.INFO: ProcessCDR(1,14591814,1,1,2) [2025-03-02 14:42:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591814,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:42:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591814,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:42:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591814,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:42:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591814,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:42:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591814', 'tblTempUsageDetail_20' ) start [2025-03-02 14:42:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591814', 'tblTempUsageDetail_20' ) end [2025-03-02 14:42:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:42:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:42:23] Production.INFO: ==26383== Releasing lock... [2025-03-02 14:42:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:42:23] Production.INFO: 41 MB #Memory Used# [2025-03-02 14:43:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:43:06 [end_date_ymd] => 2025-03-02 14:43:06 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:43:06' and `end` < '2025-03-02 14: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-03-02 14:43:18] Production.INFO: count ==1725 [2025-03-02 14:43:19] Production.ERROR: pbx CDR StartTime 2025-03-02 11:43:06 - End Time 2025-03-02 14:43:06 [2025-03-02 14:43:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:43:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591819', 'tblTempUsageDetail_20' ) start [2025-03-02 14:43:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591819', 'tblTempUsageDetail_20' ) end [2025-03-02 14:43:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591819', 'tblTempVendorCDR_20' ) start [2025-03-02 14:43:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591819', 'tblTempVendorCDR_20' ) end [2025-03-02 14:43:19] Production.INFO: ProcessCDR(1,14591819,1,1,2) [2025-03-02 14:43:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591819,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:43:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591819,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:43:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591819,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:43:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591819,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:43:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591819', 'tblTempUsageDetail_20' ) start [2025-03-02 14:43:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591819', 'tblTempUsageDetail_20' ) end [2025-03-02 14:43:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:43:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:43:22] Production.INFO: ==26486== Releasing lock... [2025-03-02 14:43:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:43:22] Production.INFO: 41 MB #Memory Used# [2025-03-02 14:44:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:44:05 [end_date_ymd] => 2025-03-02 14:44:05 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:44:05' and `end` < '2025-03-02 14: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-03-02 14:44:17] Production.INFO: count ==1719 [2025-03-02 14:44:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:44:05 - End Time 2025-03-02 14:44:05 [2025-03-02 14:44:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591824', 'tblTempUsageDetail_20' ) start [2025-03-02 14:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591824', 'tblTempUsageDetail_20' ) end [2025-03-02 14:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591824', 'tblTempVendorCDR_20' ) start [2025-03-02 14:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591824', 'tblTempVendorCDR_20' ) end [2025-03-02 14:44:18] Production.INFO: ProcessCDR(1,14591824,1,1,2) [2025-03-02 14:44:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591824,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:44:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591824,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:44:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591824,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:44:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591824,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591824', 'tblTempUsageDetail_20' ) start [2025-03-02 14:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591824', 'tblTempUsageDetail_20' ) end [2025-03-02 14:44:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:44:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:44:21] Production.INFO: ==26583== Releasing lock... [2025-03-02 14:44:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:44:21] Production.INFO: 41 MB #Memory Used# [2025-03-02 14:45:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:45:06 [end_date_ymd] => 2025-03-02 14:45:06 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:45:06' and `end` < '2025-03-02 14: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-03-02 14:45:18] Production.INFO: count ==1714 [2025-03-02 14:45:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:45:06 - End Time 2025-03-02 14:45:06 [2025-03-02 14:45:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:45:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591829', 'tblTempUsageDetail_20' ) start [2025-03-02 14:45:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591829', 'tblTempUsageDetail_20' ) end [2025-03-02 14:45:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591829', 'tblTempVendorCDR_20' ) start [2025-03-02 14:45:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591829', 'tblTempVendorCDR_20' ) end [2025-03-02 14:45:18] Production.INFO: ProcessCDR(1,14591829,1,1,2) [2025-03-02 14:45:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591829,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:45:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591829,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:45:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591829,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:45:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591829,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:45:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591829', 'tblTempUsageDetail_20' ) start [2025-03-02 14:45:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591829', 'tblTempUsageDetail_20' ) end [2025-03-02 14:45:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:45:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:45:21] Production.INFO: ==26684== Releasing lock... [2025-03-02 14:45:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:45:21] Production.INFO: 41 MB #Memory Used# [2025-03-02 14:46:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:46:05 [end_date_ymd] => 2025-03-02 14:46:05 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:46:05' and `end` < '2025-03-02 14: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-03-02 14:46:17] Production.INFO: count ==1702 [2025-03-02 14:46:17] Production.ERROR: pbx CDR StartTime 2025-03-02 11:46:05 - End Time 2025-03-02 14:46:05 [2025-03-02 14:46:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591834', 'tblTempUsageDetail_20' ) start [2025-03-02 14:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591834', 'tblTempUsageDetail_20' ) end [2025-03-02 14:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591834', 'tblTempVendorCDR_20' ) start [2025-03-02 14:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591834', 'tblTempVendorCDR_20' ) end [2025-03-02 14:46:18] Production.INFO: ProcessCDR(1,14591834,1,1,2) [2025-03-02 14:46:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591834,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:46:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591834,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:46:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591834,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:46:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591834,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591834', 'tblTempUsageDetail_20' ) start [2025-03-02 14:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591834', 'tblTempUsageDetail_20' ) end [2025-03-02 14:46:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:46:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:46:21] Production.INFO: ==26786== Releasing lock... [2025-03-02 14:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:46:21] Production.INFO: 40.5 MB #Memory Used# [2025-03-02 14:47:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:47:05 [end_date_ymd] => 2025-03-02 14:47:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 11:47:05' and `end` < '2025-03-02 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-03-02 14:47:17] Production.INFO: count ==1700 [2025-03-02 14:47:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:47:05 - End Time 2025-03-02 14:47:05 [2025-03-02 14:47:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591839', 'tblTempUsageDetail_20' ) start [2025-03-02 14:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591839', 'tblTempUsageDetail_20' ) end [2025-03-02 14:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591839', 'tblTempVendorCDR_20' ) start [2025-03-02 14:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591839', 'tblTempVendorCDR_20' ) end [2025-03-02 14:47:18] Production.INFO: ProcessCDR(1,14591839,1,1,2) [2025-03-02 14:47:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591839,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:47:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591839,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:47:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591839,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:47:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591839,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:47:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591839', 'tblTempUsageDetail_20' ) start [2025-03-02 14:47:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591839', 'tblTempUsageDetail_20' ) end [2025-03-02 14:47:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:47:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:47:21] Production.INFO: ==26884== Releasing lock... [2025-03-02 14:47:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:47:21] Production.INFO: 40.75 MB #Memory Used# [2025-03-02 14:48:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:48:05 [end_date_ymd] => 2025-03-02 14:48:05 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:48:05' and `end` < '2025-03-02 14: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-03-02 14:48:17] Production.INFO: count ==1700 [2025-03-02 14:48:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:48:05 - End Time 2025-03-02 14:48:05 [2025-03-02 14:48:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591844', 'tblTempUsageDetail_20' ) start [2025-03-02 14:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591844', 'tblTempUsageDetail_20' ) end [2025-03-02 14:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591844', 'tblTempVendorCDR_20' ) start [2025-03-02 14:48:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591844', 'tblTempVendorCDR_20' ) end [2025-03-02 14:48:18] Production.INFO: ProcessCDR(1,14591844,1,1,2) [2025-03-02 14:48:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591844,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:48:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591844,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:48:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591844,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:48:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591844,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:48:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591844', 'tblTempUsageDetail_20' ) start [2025-03-02 14:48:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591844', 'tblTempUsageDetail_20' ) end [2025-03-02 14:48:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:48:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:48:21] Production.INFO: ==26980== Releasing lock... [2025-03-02 14:48:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:48:21] Production.INFO: 40.75 MB #Memory Used# [2025-03-02 14:49:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:49:05 [end_date_ymd] => 2025-03-02 14:49:05 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:49:05' and `end` < '2025-03-02 14: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-03-02 14:49:17] Production.INFO: count ==1733 [2025-03-02 14:49:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:49:05 - End Time 2025-03-02 14:49:05 [2025-03-02 14:49:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591849', 'tblTempUsageDetail_20' ) start [2025-03-02 14:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591849', 'tblTempUsageDetail_20' ) end [2025-03-02 14:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591849', 'tblTempVendorCDR_20' ) start [2025-03-02 14:49:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591849', 'tblTempVendorCDR_20' ) end [2025-03-02 14:49:18] Production.INFO: ProcessCDR(1,14591849,1,1,2) [2025-03-02 14:49:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591849,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:49:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591849,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:49:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591849,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:49:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591849,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:49:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591849', 'tblTempUsageDetail_20' ) start [2025-03-02 14:49:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591849', 'tblTempUsageDetail_20' ) end [2025-03-02 14:49:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:49:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:49:21] Production.INFO: ==27113== Releasing lock... [2025-03-02 14:49:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:49:21] Production.INFO: 41 MB #Memory Used# [2025-03-02 14:50:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:50:05 [end_date_ymd] => 2025-03-02 14:50:05 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:50:05' and `end` < '2025-03-02 14: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-03-02 14:50:17] Production.INFO: count ==1776 [2025-03-02 14:50:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:50:05 - End Time 2025-03-02 14:50:05 [2025-03-02 14:50:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591855', 'tblTempUsageDetail_20' ) start [2025-03-02 14:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591855', 'tblTempUsageDetail_20' ) end [2025-03-02 14:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591855', 'tblTempVendorCDR_20' ) start [2025-03-02 14:50:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591855', 'tblTempVendorCDR_20' ) end [2025-03-02 14:50:18] Production.INFO: ProcessCDR(1,14591855,1,1,2) [2025-03-02 14:50:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591855,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:50:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591855,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:50:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591855,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:50:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591855,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:50:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591855', 'tblTempUsageDetail_20' ) start [2025-03-02 14:50:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591855', 'tblTempUsageDetail_20' ) end [2025-03-02 14:50:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:50:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:50:21] Production.INFO: ==27206== Releasing lock... [2025-03-02 14:50:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:50:21] Production.INFO: 41.25 MB #Memory Used# [2025-03-02 14:51:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:51:05 [end_date_ymd] => 2025-03-02 14:51:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 11:51:05' and `end` < '2025-03-02 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-03-02 14:51:17] Production.INFO: count ==1830 [2025-03-02 14:51:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:51:05 - End Time 2025-03-02 14:51:05 [2025-03-02 14:51:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591860', 'tblTempUsageDetail_20' ) start [2025-03-02 14:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591860', 'tblTempUsageDetail_20' ) end [2025-03-02 14:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591860', 'tblTempVendorCDR_20' ) start [2025-03-02 14:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591860', 'tblTempVendorCDR_20' ) end [2025-03-02 14:51:18] Production.INFO: ProcessCDR(1,14591860,1,1,2) [2025-03-02 14:51:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591860,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:51:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591860,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:51:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591860,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:51:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591860,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:51:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591860', 'tblTempUsageDetail_20' ) start [2025-03-02 14:51:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591860', 'tblTempUsageDetail_20' ) end [2025-03-02 14:51:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:51:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:51:22] Production.INFO: ==27306== Releasing lock... [2025-03-02 14:51:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:51:22] Production.INFO: 41.75 MB #Memory Used# [2025-03-02 14:52:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:52:06 [end_date_ymd] => 2025-03-02 14:52:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 11:52:06' and `end` < '2025-03-02 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-03-02 14:52:18] Production.INFO: count ==1875 [2025-03-02 14:52:19] Production.ERROR: pbx CDR StartTime 2025-03-02 11:52:06 - End Time 2025-03-02 14:52:06 [2025-03-02 14:52:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:52:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591865', 'tblTempUsageDetail_20' ) start [2025-03-02 14:52:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591865', 'tblTempUsageDetail_20' ) end [2025-03-02 14:52:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591865', 'tblTempVendorCDR_20' ) start [2025-03-02 14:52:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591865', 'tblTempVendorCDR_20' ) end [2025-03-02 14:52:19] Production.INFO: ProcessCDR(1,14591865,1,1,2) [2025-03-02 14:52:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591865,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:52:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591865,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:52:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591865,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:52:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591865,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:52:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591865', 'tblTempUsageDetail_20' ) start [2025-03-02 14:52:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591865', 'tblTempUsageDetail_20' ) end [2025-03-02 14:52:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:52:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:52:22] Production.INFO: ==27396== Releasing lock... [2025-03-02 14:52:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:52:22] Production.INFO: 42 MB #Memory Used# [2025-03-02 14:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:53:05 [end_date_ymd] => 2025-03-02 14:53:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 11:53:05' and `end` < '2025-03-02 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-03-02 14:53:18] Production.INFO: count ==1916 [2025-03-02 14:53:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:53:05 - End Time 2025-03-02 14:53:05 [2025-03-02 14:53:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:53:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591870', 'tblTempUsageDetail_20' ) start [2025-03-02 14:53:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591870', 'tblTempUsageDetail_20' ) end [2025-03-02 14:53:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591870', 'tblTempVendorCDR_20' ) start [2025-03-02 14:53:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591870', 'tblTempVendorCDR_20' ) end [2025-03-02 14:53:18] Production.INFO: ProcessCDR(1,14591870,1,1,2) [2025-03-02 14:53:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591870,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:53:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591870,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:53:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591870,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:53:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591870,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:53:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591870', 'tblTempUsageDetail_20' ) start [2025-03-02 14:53:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591870', 'tblTempUsageDetail_20' ) end [2025-03-02 14:53:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:53:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:53:22] Production.INFO: ==27494== Releasing lock... [2025-03-02 14:53:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:53:22] Production.INFO: 42.5 MB #Memory Used# [2025-03-02 14:54:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:54:06 [end_date_ymd] => 2025-03-02 14:54:06 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:54:06' and `end` < '2025-03-02 14: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-03-02 14:54:18] Production.INFO: count ==1956 [2025-03-02 14:54:19] Production.ERROR: pbx CDR StartTime 2025-03-02 11:54:06 - End Time 2025-03-02 14:54:06 [2025-03-02 14:54:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:54:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591875', 'tblTempUsageDetail_20' ) start [2025-03-02 14:54:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591875', 'tblTempUsageDetail_20' ) end [2025-03-02 14:54:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591875', 'tblTempVendorCDR_20' ) start [2025-03-02 14:54:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591875', 'tblTempVendorCDR_20' ) end [2025-03-02 14:54:19] Production.INFO: ProcessCDR(1,14591875,1,1,2) [2025-03-02 14:54:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591875,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:54:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591875,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:54:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591875,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:54:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591875,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:54:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591875', 'tblTempUsageDetail_20' ) start [2025-03-02 14:54:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591875', 'tblTempUsageDetail_20' ) end [2025-03-02 14:54:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:54:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:54:22] Production.INFO: ==27584== Releasing lock... [2025-03-02 14:54:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:54:22] Production.INFO: 42.75 MB #Memory Used# [2025-03-02 14:55:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:55:05 [end_date_ymd] => 2025-03-02 14:55:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 11:55:05' and `end` < '2025-03-02 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-03-02 14:55:17] Production.INFO: count ==1988 [2025-03-02 14:55:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:55:05 - End Time 2025-03-02 14:55:05 [2025-03-02 14:55:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591880', 'tblTempUsageDetail_20' ) start [2025-03-02 14:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591880', 'tblTempUsageDetail_20' ) end [2025-03-02 14:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591880', 'tblTempVendorCDR_20' ) start [2025-03-02 14:55:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591880', 'tblTempVendorCDR_20' ) end [2025-03-02 14:55:18] Production.INFO: ProcessCDR(1,14591880,1,1,2) [2025-03-02 14:55:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591880,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:55:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591880,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:55:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591880,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:55:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591880,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591880', 'tblTempUsageDetail_20' ) start [2025-03-02 14:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591880', 'tblTempUsageDetail_20' ) end [2025-03-02 14:55:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:55:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:55:21] Production.INFO: ==27690== Releasing lock... [2025-03-02 14:55:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:55:21] Production.INFO: 43 MB #Memory Used# [2025-03-02 14:56:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:56:05 [end_date_ymd] => 2025-03-02 14:56:05 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:56:05' and `end` < '2025-03-02 14: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-03-02 14:56:18] Production.INFO: count ==2027 [2025-03-02 14:56:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:56:05 - End Time 2025-03-02 14:56:05 [2025-03-02 14:56:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591885', 'tblTempUsageDetail_20' ) start [2025-03-02 14:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591885', 'tblTempUsageDetail_20' ) end [2025-03-02 14:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591885', 'tblTempVendorCDR_20' ) start [2025-03-02 14:56:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591885', 'tblTempVendorCDR_20' ) end [2025-03-02 14:56:18] Production.INFO: ProcessCDR(1,14591885,1,1,2) [2025-03-02 14:56:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591885,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:56:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591885,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:56:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591885,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:56:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591885,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:56:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591885', 'tblTempUsageDetail_20' ) start [2025-03-02 14:56:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591885', 'tblTempUsageDetail_20' ) end [2025-03-02 14:56:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:56:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:56:22] Production.INFO: ==27803== Releasing lock... [2025-03-02 14:56:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:56:22] Production.INFO: 43.25 MB #Memory Used# [2025-03-02 14:57:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:57:05 [end_date_ymd] => 2025-03-02 14:57:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 11:57:05' and `end` < '2025-03-02 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-03-02 14:57:17] Production.INFO: count ==2363 [2025-03-02 14:57:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:57:05 - End Time 2025-03-02 14:57:05 [2025-03-02 14:57:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591890', 'tblTempUsageDetail_20' ) start [2025-03-02 14:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591890', 'tblTempUsageDetail_20' ) end [2025-03-02 14:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591890', 'tblTempVendorCDR_20' ) start [2025-03-02 14:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591890', 'tblTempVendorCDR_20' ) end [2025-03-02 14:57:18] Production.INFO: ProcessCDR(1,14591890,1,1,2) [2025-03-02 14:57:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591890,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:57:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591890,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:57:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591890,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:57:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591890,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:57:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591890', 'tblTempUsageDetail_20' ) start [2025-03-02 14:57:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591890', 'tblTempUsageDetail_20' ) end [2025-03-02 14:57:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:57:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:57:21] Production.INFO: ==27915== Releasing lock... [2025-03-02 14:57:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:57:21] Production.INFO: 45.75 MB #Memory Used# [2025-03-02 14:58:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:58:06 [end_date_ymd] => 2025-03-02 14:58:06 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:58:06' and `end` < '2025-03-02 14: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-03-02 14:58:18] Production.INFO: count ==2366 [2025-03-02 14:58:19] Production.ERROR: pbx CDR StartTime 2025-03-02 11:58:06 - End Time 2025-03-02 14:58:06 [2025-03-02 14:58:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:58:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591895', 'tblTempUsageDetail_20' ) start [2025-03-02 14:58:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591895', 'tblTempUsageDetail_20' ) end [2025-03-02 14:58:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591895', 'tblTempVendorCDR_20' ) start [2025-03-02 14:58:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591895', 'tblTempVendorCDR_20' ) end [2025-03-02 14:58:19] Production.INFO: ProcessCDR(1,14591895,1,1,2) [2025-03-02 14:58:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591895,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:58:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591895,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:58:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591895,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:58:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591895,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:58:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591895', 'tblTempUsageDetail_20' ) start [2025-03-02 14:58:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591895', 'tblTempUsageDetail_20' ) end [2025-03-02 14:58:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:58:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:58:22] Production.INFO: ==28013== Releasing lock... [2025-03-02 14:58:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:58:22] Production.INFO: 46 MB #Memory Used# [2025-03-02 14:59:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 11:59:05 [end_date_ymd] => 2025-03-02 14:59:05 [RateCDR] => 1 ) [2025-03-02 14: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-03-02 11:59:05' and `end` < '2025-03-02 14: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-03-02 14:59:17] Production.INFO: count ==2382 [2025-03-02 14:59:18] Production.ERROR: pbx CDR StartTime 2025-03-02 11:59:05 - End Time 2025-03-02 14:59:05 [2025-03-02 14:59:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 14:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591900', 'tblTempUsageDetail_20' ) start [2025-03-02 14:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591900', 'tblTempUsageDetail_20' ) end [2025-03-02 14:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591900', 'tblTempVendorCDR_20' ) start [2025-03-02 14:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591900', 'tblTempVendorCDR_20' ) end [2025-03-02 14:59:18] Production.INFO: ProcessCDR(1,14591900,1,1,2) [2025-03-02 14:59:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591900,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:59:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591900,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 14:59:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591900,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:59:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591900,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 14:59:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591900', 'tblTempUsageDetail_20' ) start [2025-03-02 14:59:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591900', 'tblTempUsageDetail_20' ) end [2025-03-02 14:59:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 14:59:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 14:59:23] Production.INFO: ==28112== Releasing lock... [2025-03-02 14:59:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 14:59:23] Production.INFO: 46 MB #Memory Used# [2025-03-02 15:00:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:00:06 [end_date_ymd] => 2025-03-02 15:00:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:00:06' and `end` < '2025-03-02 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-03-02 15:00:19] Production.INFO: count ==2381 [2025-03-02 15:00:20] Production.ERROR: pbx CDR StartTime 2025-03-02 12:00:06 - End Time 2025-03-02 15:00:06 [2025-03-02 15:00:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:00:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591906', 'tblTempUsageDetail_20' ) start [2025-03-02 15:00:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591906', 'tblTempUsageDetail_20' ) end [2025-03-02 15:00:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591906', 'tblTempVendorCDR_20' ) start [2025-03-02 15:00:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591906', 'tblTempVendorCDR_20' ) end [2025-03-02 15:00:20] Production.INFO: ProcessCDR(1,14591906,1,1,2) [2025-03-02 15:00:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591906,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:00:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591906,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:00:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591906,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:00:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591906,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:00:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591906', 'tblTempUsageDetail_20' ) start [2025-03-02 15:00:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591906', 'tblTempUsageDetail_20' ) end [2025-03-02 15:00:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:00:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:00:23] Production.INFO: ==28232== Releasing lock... [2025-03-02 15:00:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:00:23] Production.INFO: 46 MB #Memory Used# [2025-03-02 15:01:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:01:05 [end_date_ymd] => 2025-03-02 15:01:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:01:05' and `end` < '2025-03-02 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-03-02 15:01:17] Production.INFO: count ==2402 [2025-03-02 15:01:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:01:05 - End Time 2025-03-02 15:01:05 [2025-03-02 15:01:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591911', 'tblTempUsageDetail_20' ) start [2025-03-02 15:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591911', 'tblTempUsageDetail_20' ) end [2025-03-02 15:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591911', 'tblTempVendorCDR_20' ) start [2025-03-02 15:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591911', 'tblTempVendorCDR_20' ) end [2025-03-02 15:01:18] Production.INFO: ProcessCDR(1,14591911,1,1,2) [2025-03-02 15:01:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591911,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:01:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591911,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:01:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591911,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:01:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591911,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:01:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591911', 'tblTempUsageDetail_20' ) start [2025-03-02 15:01:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591911', 'tblTempUsageDetail_20' ) end [2025-03-02 15:01:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:01:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:01:23] Production.INFO: ==28422== Releasing lock... [2025-03-02 15:01:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:01:23] Production.INFO: 46 MB #Memory Used# [2025-03-02 15:02:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:02:06 [end_date_ymd] => 2025-03-02 15:02:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:02:06' and `end` < '2025-03-02 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-03-02 15:02:18] Production.INFO: count ==2402 [2025-03-02 15:02:19] Production.ERROR: pbx CDR StartTime 2025-03-02 12:02:06 - End Time 2025-03-02 15:02:06 [2025-03-02 15:02:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:02:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591916', 'tblTempUsageDetail_20' ) start [2025-03-02 15:02:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591916', 'tblTempUsageDetail_20' ) end [2025-03-02 15:02:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591916', 'tblTempVendorCDR_20' ) start [2025-03-02 15:02:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591916', 'tblTempVendorCDR_20' ) end [2025-03-02 15:02:19] Production.INFO: ProcessCDR(1,14591916,1,1,2) [2025-03-02 15:02:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591916,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:02:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591916,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:02:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591916,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:02:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591916,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:02:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591916', 'tblTempUsageDetail_20' ) start [2025-03-02 15:02:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591916', 'tblTempUsageDetail_20' ) end [2025-03-02 15:02:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:02:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:02:22] Production.INFO: ==28530== Releasing lock... [2025-03-02 15:02:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:02:22] Production.INFO: 46 MB #Memory Used# [2025-03-02 15:03:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:03:05 [end_date_ymd] => 2025-03-02 15:03:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:03:05' and `end` < '2025-03-02 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-03-02 15:03:17] Production.INFO: count ==2407 [2025-03-02 15:03:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:03:05 - End Time 2025-03-02 15:03:05 [2025-03-02 15:03:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591921', 'tblTempUsageDetail_20' ) start [2025-03-02 15:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591921', 'tblTempUsageDetail_20' ) end [2025-03-02 15:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591921', 'tblTempVendorCDR_20' ) start [2025-03-02 15:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591921', 'tblTempVendorCDR_20' ) end [2025-03-02 15:03:18] Production.INFO: ProcessCDR(1,14591921,1,1,2) [2025-03-02 15:03:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591921,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:03:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591921,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:03:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591921,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:03:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591921,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:03:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591921', 'tblTempUsageDetail_20' ) start [2025-03-02 15:03:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591921', 'tblTempUsageDetail_20' ) end [2025-03-02 15:03:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:03:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:03:23] Production.INFO: ==28638== Releasing lock... [2025-03-02 15:03:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:03:23] Production.INFO: 46 MB #Memory Used# [2025-03-02 15:04:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:04:05 [end_date_ymd] => 2025-03-02 15:04:05 [RateCDR] => 1 ) [2025-03-02 15: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-03-02 12:04:05' and `end` < '2025-03-02 15: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-03-02 15:04:17] Production.INFO: count ==2407 [2025-03-02 15:04:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:04:05 - End Time 2025-03-02 15:04:05 [2025-03-02 15:04:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:04:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591926', 'tblTempUsageDetail_20' ) start [2025-03-02 15:04:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591926', 'tblTempUsageDetail_20' ) end [2025-03-02 15:04:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591926', 'tblTempVendorCDR_20' ) start [2025-03-02 15:04:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591926', 'tblTempVendorCDR_20' ) end [2025-03-02 15:04:18] Production.INFO: ProcessCDR(1,14591926,1,1,2) [2025-03-02 15:04:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591926,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:04:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591926,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:04:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591926,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:04:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591926,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:04:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591926', 'tblTempUsageDetail_20' ) start [2025-03-02 15:04:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591926', 'tblTempUsageDetail_20' ) end [2025-03-02 15:04:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:04:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:04:22] Production.INFO: ==28740== Releasing lock... [2025-03-02 15:04:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:04:22] Production.INFO: 46 MB #Memory Used# [2025-03-02 15:05:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:05:05 [end_date_ymd] => 2025-03-02 15:05:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:05:05' and `end` < '2025-03-02 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-03-02 15:05:17] Production.INFO: count ==2407 [2025-03-02 15:05:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:05:05 - End Time 2025-03-02 15:05:05 [2025-03-02 15:05:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591931', 'tblTempUsageDetail_20' ) start [2025-03-02 15:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591931', 'tblTempUsageDetail_20' ) end [2025-03-02 15:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591931', 'tblTempVendorCDR_20' ) start [2025-03-02 15:05:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591931', 'tblTempVendorCDR_20' ) end [2025-03-02 15:05:18] Production.INFO: ProcessCDR(1,14591931,1,1,2) [2025-03-02 15:05:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591931,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:05:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591931,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:05:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591931,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:05:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591931,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:05:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591931', 'tblTempUsageDetail_20' ) start [2025-03-02 15:05:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591931', 'tblTempUsageDetail_20' ) end [2025-03-02 15:05:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:05:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:05:21] Production.INFO: ==28963== Releasing lock... [2025-03-02 15:05:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:05:21] Production.INFO: 46 MB #Memory Used# [2025-03-02 15:06:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:06:05 [end_date_ymd] => 2025-03-02 15:06:05 [RateCDR] => 1 ) [2025-03-02 15: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-03-02 12:06:05' and `end` < '2025-03-02 15: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-03-02 15:06:17] Production.INFO: count ==2397 [2025-03-02 15:06:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:06:05 - End Time 2025-03-02 15:06:05 [2025-03-02 15:06:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:06:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591936', 'tblTempUsageDetail_20' ) start [2025-03-02 15:06:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591936', 'tblTempUsageDetail_20' ) end [2025-03-02 15:06:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591936', 'tblTempVendorCDR_20' ) start [2025-03-02 15:06:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591936', 'tblTempVendorCDR_20' ) end [2025-03-02 15:06:18] Production.INFO: ProcessCDR(1,14591936,1,1,2) [2025-03-02 15:06:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591936,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:06:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591936,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:06:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591936,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:06:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591936,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:06:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591936', 'tblTempUsageDetail_20' ) start [2025-03-02 15:06:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591936', 'tblTempUsageDetail_20' ) end [2025-03-02 15:06:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:06:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:06:22] Production.INFO: ==29066== Releasing lock... [2025-03-02 15:06:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:06:22] Production.INFO: 46 MB #Memory Used# [2025-03-02 15:07:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:07:05 [end_date_ymd] => 2025-03-02 15:07:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:07:05' and `end` < '2025-03-02 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-03-02 15:07:18] Production.INFO: count ==2398 [2025-03-02 15:07:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:07:05 - End Time 2025-03-02 15:07:05 [2025-03-02 15:07:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591941', 'tblTempUsageDetail_20' ) start [2025-03-02 15:07:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591941', 'tblTempUsageDetail_20' ) end [2025-03-02 15:07:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591941', 'tblTempVendorCDR_20' ) start [2025-03-02 15:07:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591941', 'tblTempVendorCDR_20' ) end [2025-03-02 15:07:19] Production.INFO: ProcessCDR(1,14591941,1,1,2) [2025-03-02 15:07:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591941,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:07:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591941,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:07:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591941,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:07:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591941,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:07:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591941', 'tblTempUsageDetail_20' ) start [2025-03-02 15:07:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591941', 'tblTempUsageDetail_20' ) end [2025-03-02 15:07:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:07:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:07:22] Production.INFO: ==29155== Releasing lock... [2025-03-02 15:07:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:07:22] Production.INFO: 45.75 MB #Memory Used# [2025-03-02 15:08:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:08:05 [end_date_ymd] => 2025-03-02 15:08:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:08:05' and `end` < '2025-03-02 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-03-02 15:08:17] Production.INFO: count ==2396 [2025-03-02 15:08:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:08:05 - End Time 2025-03-02 15:08:05 [2025-03-02 15:08:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591946', 'tblTempUsageDetail_20' ) start [2025-03-02 15:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591946', 'tblTempUsageDetail_20' ) end [2025-03-02 15:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591946', 'tblTempVendorCDR_20' ) start [2025-03-02 15:08:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591946', 'tblTempVendorCDR_20' ) end [2025-03-02 15:08:18] Production.INFO: ProcessCDR(1,14591946,1,1,2) [2025-03-02 15:08:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591946,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:08:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591946,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:08:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591946,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:08:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591946,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:08:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591946', 'tblTempUsageDetail_20' ) start [2025-03-02 15:08:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591946', 'tblTempUsageDetail_20' ) end [2025-03-02 15:08:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:08:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:08:23] Production.INFO: ==29325== Releasing lock... [2025-03-02 15:08:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:08:23] Production.INFO: 46 MB #Memory Used# [2025-03-02 15:09:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:09:06 [end_date_ymd] => 2025-03-02 15:09:06 [RateCDR] => 1 ) [2025-03-02 15: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-03-02 12:09:06' and `end` < '2025-03-02 15: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-03-02 15:09:18] Production.INFO: count ==2383 [2025-03-02 15:09:19] Production.ERROR: pbx CDR StartTime 2025-03-02 12:09:06 - End Time 2025-03-02 15:09:06 [2025-03-02 15:09:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:09:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591951', 'tblTempUsageDetail_20' ) start [2025-03-02 15:09:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591951', 'tblTempUsageDetail_20' ) end [2025-03-02 15:09:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591951', 'tblTempVendorCDR_20' ) start [2025-03-02 15:09:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591951', 'tblTempVendorCDR_20' ) end [2025-03-02 15:09:19] Production.INFO: ProcessCDR(1,14591951,1,1,2) [2025-03-02 15:09:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591951,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:09:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591951,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:09:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591951,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:09:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591951,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:09:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591951', 'tblTempUsageDetail_20' ) start [2025-03-02 15:09:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591951', 'tblTempUsageDetail_20' ) end [2025-03-02 15:09:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:09:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:09:24] Production.INFO: ==29414== Releasing lock... [2025-03-02 15:09:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:09:24] Production.INFO: 46.25 MB #Memory Used# [2025-03-02 15:10:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:10:06 [end_date_ymd] => 2025-03-02 15:10:06 [RateCDR] => 1 ) [2025-03-02 15: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-03-02 12:10:06' and `end` < '2025-03-02 15: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-03-02 15:10:18] Production.INFO: count ==2382 [2025-03-02 15:10:19] Production.ERROR: pbx CDR StartTime 2025-03-02 12:10:06 - End Time 2025-03-02 15:10:06 [2025-03-02 15:10:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:10:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591957', 'tblTempUsageDetail_20' ) start [2025-03-02 15:10:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591957', 'tblTempUsageDetail_20' ) end [2025-03-02 15:10:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591957', 'tblTempVendorCDR_20' ) start [2025-03-02 15:10:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591957', 'tblTempVendorCDR_20' ) end [2025-03-02 15:10:19] Production.INFO: ProcessCDR(1,14591957,1,1,2) [2025-03-02 15:10:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591957,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:10:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591957,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:10:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591957,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:10:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591957,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:10:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591957', 'tblTempUsageDetail_20' ) start [2025-03-02 15:10:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591957', 'tblTempUsageDetail_20' ) end [2025-03-02 15:10:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:10:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:10:22] Production.INFO: ==29516== Releasing lock... [2025-03-02 15:10:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:10:22] Production.INFO: 46 MB #Memory Used# [2025-03-02 15:11:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:11:06 [end_date_ymd] => 2025-03-02 15:11:06 [RateCDR] => 1 ) [2025-03-02 15: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-03-02 12:11:06' and `end` < '2025-03-02 15: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-03-02 15:11:18] Production.INFO: count ==2354 [2025-03-02 15:11:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:11:06 - End Time 2025-03-02 15:11:06 [2025-03-02 15:11:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:11:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591962', 'tblTempUsageDetail_20' ) start [2025-03-02 15:11:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591962', 'tblTempUsageDetail_20' ) end [2025-03-02 15:11:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591962', 'tblTempVendorCDR_20' ) start [2025-03-02 15:11:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591962', 'tblTempVendorCDR_20' ) end [2025-03-02 15:11:19] Production.INFO: ProcessCDR(1,14591962,1,1,2) [2025-03-02 15:11:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591962,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:11:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591962,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:11:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591962,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:11:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591962,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:11:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591962', 'tblTempUsageDetail_20' ) start [2025-03-02 15:11:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591962', 'tblTempUsageDetail_20' ) end [2025-03-02 15:11:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:11:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:11:23] Production.INFO: ==29611== Releasing lock... [2025-03-02 15:11:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:11:23] Production.INFO: 45.75 MB #Memory Used# [2025-03-02 15:12:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:12:05 [end_date_ymd] => 2025-03-02 15:12:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:12:05' and `end` < '2025-03-02 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-03-02 15:12:18] Production.INFO: count ==2353 [2025-03-02 15:12:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:12:05 - End Time 2025-03-02 15:12:05 [2025-03-02 15:12:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591967', 'tblTempUsageDetail_20' ) start [2025-03-02 15:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591967', 'tblTempUsageDetail_20' ) end [2025-03-02 15:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591967', 'tblTempVendorCDR_20' ) start [2025-03-02 15:12:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591967', 'tblTempVendorCDR_20' ) end [2025-03-02 15:12:18] Production.INFO: ProcessCDR(1,14591967,1,1,2) [2025-03-02 15:12:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591967,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:12:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591967,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:12:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591967,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:12:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591967,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:12:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591967', 'tblTempUsageDetail_20' ) start [2025-03-02 15:12:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591967', 'tblTempUsageDetail_20' ) end [2025-03-02 15:12:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:12:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:12:23] Production.INFO: ==29790== Releasing lock... [2025-03-02 15:12:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:12:23] Production.INFO: 46 MB #Memory Used# [2025-03-02 15:13:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:13:06 [end_date_ymd] => 2025-03-02 15:13:06 [RateCDR] => 1 ) [2025-03-02 15: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-03-02 12:13:06' and `end` < '2025-03-02 15: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-03-02 15:13:18] Production.INFO: count ==2352 [2025-03-02 15:13:19] Production.ERROR: pbx CDR StartTime 2025-03-02 12:13:06 - End Time 2025-03-02 15:13:06 [2025-03-02 15:13:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:13:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591972', 'tblTempUsageDetail_20' ) start [2025-03-02 15:13:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591972', 'tblTempUsageDetail_20' ) end [2025-03-02 15:13:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591972', 'tblTempVendorCDR_20' ) start [2025-03-02 15:13:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591972', 'tblTempVendorCDR_20' ) end [2025-03-02 15:13:19] Production.INFO: ProcessCDR(1,14591972,1,1,2) [2025-03-02 15:13:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591972,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:13:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591972,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:13:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591972,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:13:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591972,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:13:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591972', 'tblTempUsageDetail_20' ) start [2025-03-02 15:13:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591972', 'tblTempUsageDetail_20' ) end [2025-03-02 15:13:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:13:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:13:23] Production.INFO: ==29899== Releasing lock... [2025-03-02 15:13:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:13:23] Production.INFO: 45.75 MB #Memory Used# [2025-03-02 15:14:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:14:04 [end_date_ymd] => 2025-03-02 15:14:04 [RateCDR] => 1 ) [2025-03-02 15: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-03-02 12:14:04' and `end` < '2025-03-02 15: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-03-02 15:14:17] Production.INFO: count ==2354 [2025-03-02 15:14:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:14:04 - End Time 2025-03-02 15:14:04 [2025-03-02 15:14:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591977', 'tblTempUsageDetail_20' ) start [2025-03-02 15:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591977', 'tblTempUsageDetail_20' ) end [2025-03-02 15:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591977', 'tblTempVendorCDR_20' ) start [2025-03-02 15:14:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591977', 'tblTempVendorCDR_20' ) end [2025-03-02 15:14:18] Production.INFO: ProcessCDR(1,14591977,1,1,2) [2025-03-02 15:14:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591977,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:14:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591977,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:14:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591977,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:14:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591977,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:14:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591977', 'tblTempUsageDetail_20' ) start [2025-03-02 15:14:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591977', 'tblTempUsageDetail_20' ) end [2025-03-02 15:14:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:14:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:14:22] Production.INFO: ==30007== Releasing lock... [2025-03-02 15:14:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:14:22] Production.INFO: 46 MB #Memory Used# [2025-03-02 15:15:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:15:05 [end_date_ymd] => 2025-03-02 15:15:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:15:05' and `end` < '2025-03-02 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-03-02 15:15:17] Production.INFO: count ==2352 [2025-03-02 15:15:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:15:05 - End Time 2025-03-02 15:15:05 [2025-03-02 15:15:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591982', 'tblTempUsageDetail_20' ) start [2025-03-02 15:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591982', 'tblTempUsageDetail_20' ) end [2025-03-02 15:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591982', 'tblTempVendorCDR_20' ) start [2025-03-02 15:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591982', 'tblTempVendorCDR_20' ) end [2025-03-02 15:15:18] Production.INFO: ProcessCDR(1,14591982,1,1,2) [2025-03-02 15:15:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591982,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:15:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591982,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:15:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591982,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:15:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591982,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:15:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591982', 'tblTempUsageDetail_20' ) start [2025-03-02 15:15:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591982', 'tblTempUsageDetail_20' ) end [2025-03-02 15:15:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:15:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:15:22] Production.INFO: ==30187== Releasing lock... [2025-03-02 15:15:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:15:22] Production.INFO: 45.75 MB #Memory Used# [2025-03-02 15:16:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:16:05 [end_date_ymd] => 2025-03-02 15:16:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:16:05' and `end` < '2025-03-02 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-03-02 15:16:17] Production.INFO: count ==2348 [2025-03-02 15:16:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:16:05 - End Time 2025-03-02 15:16:05 [2025-03-02 15:16:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591987', 'tblTempUsageDetail_20' ) start [2025-03-02 15:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591987', 'tblTempUsageDetail_20' ) end [2025-03-02 15:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591987', 'tblTempVendorCDR_20' ) start [2025-03-02 15:16:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591987', 'tblTempVendorCDR_20' ) end [2025-03-02 15:16:18] Production.INFO: ProcessCDR(1,14591987,1,1,2) [2025-03-02 15:16:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591987,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:16:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591987,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:16:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591987,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:16:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591987,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591987', 'tblTempUsageDetail_20' ) start [2025-03-02 15:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591987', 'tblTempUsageDetail_20' ) end [2025-03-02 15:16:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:16:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:16:21] Production.INFO: ==30272== Releasing lock... [2025-03-02 15:16:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:16:21] Production.INFO: 45.75 MB #Memory Used# [2025-03-02 15:17:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:17:05 [end_date_ymd] => 2025-03-02 15:17:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:17:05' and `end` < '2025-03-02 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-03-02 15:17:17] Production.INFO: count ==2346 [2025-03-02 15:17:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:17:05 - End Time 2025-03-02 15:17:05 [2025-03-02 15:17:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591992', 'tblTempUsageDetail_20' ) start [2025-03-02 15:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591992', 'tblTempUsageDetail_20' ) end [2025-03-02 15:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591992', 'tblTempVendorCDR_20' ) start [2025-03-02 15:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591992', 'tblTempVendorCDR_20' ) end [2025-03-02 15:17:18] Production.INFO: ProcessCDR(1,14591992,1,1,2) [2025-03-02 15:17:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591992,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:17:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591992,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:17:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591992,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:17:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591992,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591992', 'tblTempUsageDetail_20' ) start [2025-03-02 15:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591992', 'tblTempUsageDetail_20' ) end [2025-03-02 15:17:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:17:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:17:21] Production.INFO: ==30360== Releasing lock... [2025-03-02 15:17:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:17:21] Production.INFO: 45.75 MB #Memory Used# [2025-03-02 15:18:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:18:06 [end_date_ymd] => 2025-03-02 15:18:06 [RateCDR] => 1 ) [2025-03-02 15: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-03-02 12:18:06' and `end` < '2025-03-02 15: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-03-02 15:18:18] Production.INFO: count ==2336 [2025-03-02 15:18:19] Production.ERROR: pbx CDR StartTime 2025-03-02 12:18:06 - End Time 2025-03-02 15:18:06 [2025-03-02 15:18:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:18:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591997', 'tblTempUsageDetail_20' ) start [2025-03-02 15:18:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14591997', 'tblTempUsageDetail_20' ) end [2025-03-02 15:18:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591997', 'tblTempVendorCDR_20' ) start [2025-03-02 15:18:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14591997', 'tblTempVendorCDR_20' ) end [2025-03-02 15:18:19] Production.INFO: ProcessCDR(1,14591997,1,1,2) [2025-03-02 15:18:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14591997,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:18:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14591997,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:18:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14591997,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:18:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14591997,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:18:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591997', 'tblTempUsageDetail_20' ) start [2025-03-02 15:18:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14591997', 'tblTempUsageDetail_20' ) end [2025-03-02 15:18:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:18:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:18:22] Production.INFO: ==30455== Releasing lock... [2025-03-02 15:18:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:18:22] Production.INFO: 45.5 MB #Memory Used# [2025-03-02 15:19:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:19:06 [end_date_ymd] => 2025-03-02 15:19:06 [RateCDR] => 1 ) [2025-03-02 15: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-03-02 12:19:06' and `end` < '2025-03-02 15: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-03-02 15:19:18] Production.INFO: count ==2332 [2025-03-02 15:19:19] Production.ERROR: pbx CDR StartTime 2025-03-02 12:19:06 - End Time 2025-03-02 15:19:06 [2025-03-02 15:19:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:19:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592002', 'tblTempUsageDetail_20' ) start [2025-03-02 15:19:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592002', 'tblTempUsageDetail_20' ) end [2025-03-02 15:19:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592002', 'tblTempVendorCDR_20' ) start [2025-03-02 15:19:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592002', 'tblTempVendorCDR_20' ) end [2025-03-02 15:19:19] Production.INFO: ProcessCDR(1,14592002,1,1,2) [2025-03-02 15:19:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592002,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:19:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592002,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:19:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592002,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:19:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592002,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:19:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592002', 'tblTempUsageDetail_20' ) start [2025-03-02 15:19:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592002', 'tblTempUsageDetail_20' ) end [2025-03-02 15:19:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:19:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:19:24] Production.INFO: ==30551== Releasing lock... [2025-03-02 15:19:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:19:24] Production.INFO: 45.5 MB #Memory Used# [2025-03-02 15:20:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:20:05 [end_date_ymd] => 2025-03-02 15:20:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:20:05' and `end` < '2025-03-02 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-03-02 15:20:17] Production.INFO: count ==2328 [2025-03-02 15:20:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:20:05 - End Time 2025-03-02 15:20:05 [2025-03-02 15:20:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592008', 'tblTempUsageDetail_20' ) start [2025-03-02 15:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592008', 'tblTempUsageDetail_20' ) end [2025-03-02 15:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592008', 'tblTempVendorCDR_20' ) start [2025-03-02 15:20:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592008', 'tblTempVendorCDR_20' ) end [2025-03-02 15:20:18] Production.INFO: ProcessCDR(1,14592008,1,1,2) [2025-03-02 15:20:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592008,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:20:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592008,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:20:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592008,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:20:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592008,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592008', 'tblTempUsageDetail_20' ) start [2025-03-02 15:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592008', 'tblTempUsageDetail_20' ) end [2025-03-02 15:20:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:20:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:20:22] Production.INFO: ==30684== Releasing lock... [2025-03-02 15:20:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:20:22] Production.INFO: 45.5 MB #Memory Used# [2025-03-02 15:21:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:21:05 [end_date_ymd] => 2025-03-02 15:21:05 [RateCDR] => 1 ) [2025-03-02 15: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-03-02 12:21:05' and `end` < '2025-03-02 15: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-03-02 15:21:17] Production.INFO: count ==2298 [2025-03-02 15:21:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:21:05 - End Time 2025-03-02 15:21:05 [2025-03-02 15:21:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:21:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592013', 'tblTempUsageDetail_20' ) start [2025-03-02 15:21:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592013', 'tblTempUsageDetail_20' ) end [2025-03-02 15:21:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592013', 'tblTempVendorCDR_20' ) start [2025-03-02 15:21:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592013', 'tblTempVendorCDR_20' ) end [2025-03-02 15:21:18] Production.INFO: ProcessCDR(1,14592013,1,1,2) [2025-03-02 15:21:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592013,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:21:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592013,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:21:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592013,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:21:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592013,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:21:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592013', 'tblTempUsageDetail_20' ) start [2025-03-02 15:21:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592013', 'tblTempUsageDetail_20' ) end [2025-03-02 15:21:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:21:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:21:22] Production.INFO: ==30790== Releasing lock... [2025-03-02 15:21:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:21:22] Production.INFO: 45.25 MB #Memory Used# [2025-03-02 15:22:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:22:05 [end_date_ymd] => 2025-03-02 15:22:05 [RateCDR] => 1 ) [2025-03-02 15: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-03-02 12:22:05' and `end` < '2025-03-02 15: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-03-02 15:22:17] Production.INFO: count ==2305 [2025-03-02 15:22:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:22:05 - End Time 2025-03-02 15:22:05 [2025-03-02 15:22:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592018', 'tblTempUsageDetail_20' ) start [2025-03-02 15:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592018', 'tblTempUsageDetail_20' ) end [2025-03-02 15:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592018', 'tblTempVendorCDR_20' ) start [2025-03-02 15:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592018', 'tblTempVendorCDR_20' ) end [2025-03-02 15:22:18] Production.INFO: ProcessCDR(1,14592018,1,1,2) [2025-03-02 15:22:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592018,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:22:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592018,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:22:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592018,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:22:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592018,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:22:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592018', 'tblTempUsageDetail_20' ) start [2025-03-02 15:22:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592018', 'tblTempUsageDetail_20' ) end [2025-03-02 15:22:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:22:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:22:23] Production.INFO: ==30886== Releasing lock... [2025-03-02 15:22:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:22:23] Production.INFO: 45.5 MB #Memory Used# [2025-03-02 15:23:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:23:05 [end_date_ymd] => 2025-03-02 15:23:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:23:05' and `end` < '2025-03-02 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-03-02 15:23:17] Production.INFO: count ==2308 [2025-03-02 15:23:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:23:05 - End Time 2025-03-02 15:23:05 [2025-03-02 15:23:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:23:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592021', 'tblTempUsageDetail_20' ) start [2025-03-02 15:23:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592021', 'tblTempUsageDetail_20' ) end [2025-03-02 15:23:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592021', 'tblTempVendorCDR_20' ) start [2025-03-02 15:23:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592021', 'tblTempVendorCDR_20' ) end [2025-03-02 15:23:18] Production.INFO: ProcessCDR(1,14592021,1,1,2) [2025-03-02 15:23:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592021,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:23:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592021,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:23:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592021,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:23:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592021,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:23:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592021', 'tblTempUsageDetail_20' ) start [2025-03-02 15:23:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592021', 'tblTempUsageDetail_20' ) end [2025-03-02 15:23:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:23:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:23:23] Production.INFO: ==30982== Releasing lock... [2025-03-02 15:23:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:23:23] Production.INFO: 45.25 MB #Memory Used# [2025-03-02 15:24:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:24:06 [end_date_ymd] => 2025-03-02 15:24:06 [RateCDR] => 1 ) [2025-03-02 15: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-03-02 12:24:06' and `end` < '2025-03-02 15: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-03-02 15:24:18] Production.INFO: count ==2309 [2025-03-02 15:24:19] Production.ERROR: pbx CDR StartTime 2025-03-02 12:24:06 - End Time 2025-03-02 15:24:06 [2025-03-02 15:24:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:24:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592028', 'tblTempUsageDetail_20' ) start [2025-03-02 15:24:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592028', 'tblTempUsageDetail_20' ) end [2025-03-02 15:24:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592028', 'tblTempVendorCDR_20' ) start [2025-03-02 15:24:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592028', 'tblTempVendorCDR_20' ) end [2025-03-02 15:24:19] Production.INFO: ProcessCDR(1,14592028,1,1,2) [2025-03-02 15:24:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592028,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:24:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592028,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:24:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592028,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:24:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592028,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:24:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592028', 'tblTempUsageDetail_20' ) start [2025-03-02 15:24:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592028', 'tblTempUsageDetail_20' ) end [2025-03-02 15:24:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:24:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:24:24] Production.INFO: ==31081== Releasing lock... [2025-03-02 15:24:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:24:24] Production.INFO: 45.25 MB #Memory Used# [2025-03-02 15:25:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:25:05 [end_date_ymd] => 2025-03-02 15:25:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:25:05' and `end` < '2025-03-02 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-03-02 15:25:17] Production.INFO: count ==2309 [2025-03-02 15:25:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:25:05 - End Time 2025-03-02 15:25:05 [2025-03-02 15:25:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592033', 'tblTempUsageDetail_20' ) start [2025-03-02 15:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592033', 'tblTempUsageDetail_20' ) end [2025-03-02 15:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592033', 'tblTempVendorCDR_20' ) start [2025-03-02 15:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592033', 'tblTempVendorCDR_20' ) end [2025-03-02 15:25:18] Production.INFO: ProcessCDR(1,14592033,1,1,2) [2025-03-02 15:25:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592033,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:25:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592033,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:25:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592033,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:25:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592033,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:25:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592033', 'tblTempUsageDetail_20' ) start [2025-03-02 15:25:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592033', 'tblTempUsageDetail_20' ) end [2025-03-02 15:25:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:25:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:25:22] Production.INFO: ==31170== Releasing lock... [2025-03-02 15:25:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:25:22] Production.INFO: 45.5 MB #Memory Used# [2025-03-02 15:26:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:26:06 [end_date_ymd] => 2025-03-02 15:26:06 [RateCDR] => 1 ) [2025-03-02 15: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-03-02 12:26:06' and `end` < '2025-03-02 15: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-03-02 15:26:18] Production.INFO: count ==2309 [2025-03-02 15:26:19] Production.ERROR: pbx CDR StartTime 2025-03-02 12:26:06 - End Time 2025-03-02 15:26:06 [2025-03-02 15:26:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:26:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592038', 'tblTempUsageDetail_20' ) start [2025-03-02 15:26:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592038', 'tblTempUsageDetail_20' ) end [2025-03-02 15:26:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592038', 'tblTempVendorCDR_20' ) start [2025-03-02 15:26:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592038', 'tblTempVendorCDR_20' ) end [2025-03-02 15:26:19] Production.INFO: ProcessCDR(1,14592038,1,1,2) [2025-03-02 15:26:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592038,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:26:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592038,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:26:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592038,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:26:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592038,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:26:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592038', 'tblTempUsageDetail_20' ) start [2025-03-02 15:26:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592038', 'tblTempUsageDetail_20' ) end [2025-03-02 15:26:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:26:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:26:24] Production.INFO: ==31254== Releasing lock... [2025-03-02 15:26:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:26:24] Production.INFO: 45.5 MB #Memory Used# [2025-03-02 15:27:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:27:05 [end_date_ymd] => 2025-03-02 15:27:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:27:05' and `end` < '2025-03-02 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-03-02 15:27:17] Production.INFO: count ==2307 [2025-03-02 15:27:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:27:05 - End Time 2025-03-02 15:27:05 [2025-03-02 15:27:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:27:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592043', 'tblTempUsageDetail_20' ) start [2025-03-02 15:27:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592043', 'tblTempUsageDetail_20' ) end [2025-03-02 15:27:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592043', 'tblTempVendorCDR_20' ) start [2025-03-02 15:27:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592043', 'tblTempVendorCDR_20' ) end [2025-03-02 15:27:18] Production.INFO: ProcessCDR(1,14592043,1,1,2) [2025-03-02 15:27:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592043,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:27:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592043,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:27:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592043,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:27:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592043,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:27:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592043', 'tblTempUsageDetail_20' ) start [2025-03-02 15:27:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592043', 'tblTempUsageDetail_20' ) end [2025-03-02 15:27:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:27:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:27:23] Production.INFO: ==31360== Releasing lock... [2025-03-02 15:27:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:27:23] Production.INFO: 45.5 MB #Memory Used# [2025-03-02 15:28:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:28:06 [end_date_ymd] => 2025-03-02 15:28:06 [RateCDR] => 1 ) [2025-03-02 15: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-03-02 12:28:06' and `end` < '2025-03-02 15: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-03-02 15:28:18] Production.INFO: count ==2300 [2025-03-02 15:28:19] Production.ERROR: pbx CDR StartTime 2025-03-02 12:28:06 - End Time 2025-03-02 15:28:06 [2025-03-02 15:28:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:28:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592048', 'tblTempUsageDetail_20' ) start [2025-03-02 15:28:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592048', 'tblTempUsageDetail_20' ) end [2025-03-02 15:28:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592048', 'tblTempVendorCDR_20' ) start [2025-03-02 15:28:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592048', 'tblTempVendorCDR_20' ) end [2025-03-02 15:28:19] Production.INFO: ProcessCDR(1,14592048,1,1,2) [2025-03-02 15:28:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592048,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:28:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592048,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:28:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592048,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:28:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592048,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:28:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592048', 'tblTempUsageDetail_20' ) start [2025-03-02 15:28:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592048', 'tblTempUsageDetail_20' ) end [2025-03-02 15:28:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:28:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:28:24] Production.INFO: ==31475== Releasing lock... [2025-03-02 15:28:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:28:24] Production.INFO: 45.25 MB #Memory Used# [2025-03-02 15:29:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:29:05 [end_date_ymd] => 2025-03-02 15:29:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:29:05' and `end` < '2025-03-02 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-03-02 15:29:17] Production.INFO: count ==2304 [2025-03-02 15:29:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:29:05 - End Time 2025-03-02 15:29:05 [2025-03-02 15:29:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592053', 'tblTempUsageDetail_20' ) start [2025-03-02 15:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592053', 'tblTempUsageDetail_20' ) end [2025-03-02 15:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592053', 'tblTempVendorCDR_20' ) start [2025-03-02 15:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592053', 'tblTempVendorCDR_20' ) end [2025-03-02 15:29:18] Production.INFO: ProcessCDR(1,14592053,1,1,2) [2025-03-02 15:29:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592053,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:29:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592053,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:29:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592053,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:29:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592053,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:29:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592053', 'tblTempUsageDetail_20' ) start [2025-03-02 15:29:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592053', 'tblTempUsageDetail_20' ) end [2025-03-02 15:29:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:29:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:29:23] Production.INFO: ==31573== Releasing lock... [2025-03-02 15:29:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:29:23] Production.INFO: 45.25 MB #Memory Used# [2025-03-02 15:30:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:30:06 [end_date_ymd] => 2025-03-02 15:30:06 [RateCDR] => 1 ) [2025-03-02 15: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-03-02 12:30:06' and `end` < '2025-03-02 15: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-03-02 15:30:18] Production.INFO: count ==2344 [2025-03-02 15:30:19] Production.ERROR: pbx CDR StartTime 2025-03-02 12:30:06 - End Time 2025-03-02 15:30:06 [2025-03-02 15:30:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:30:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592059', 'tblTempUsageDetail_20' ) start [2025-03-02 15:30:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592059', 'tblTempUsageDetail_20' ) end [2025-03-02 15:30:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592059', 'tblTempVendorCDR_20' ) start [2025-03-02 15:30:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592059', 'tblTempVendorCDR_20' ) end [2025-03-02 15:30:19] Production.INFO: ProcessCDR(1,14592059,1,1,2) [2025-03-02 15:30:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592059,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:30:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592059,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:30:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592059,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:30:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592059,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:30:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592059', 'tblTempUsageDetail_20' ) start [2025-03-02 15:30:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592059', 'tblTempUsageDetail_20' ) end [2025-03-02 15:30:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:30:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:30:24] Production.INFO: ==31694== Releasing lock... [2025-03-02 15:30:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:30:24] Production.INFO: 45.75 MB #Memory Used# [2025-03-02 15:31:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:31:05 [end_date_ymd] => 2025-03-02 15:31:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:31:05' and `end` < '2025-03-02 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-03-02 15:31:17] Production.INFO: count ==2387 [2025-03-02 15:31:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:31:05 - End Time 2025-03-02 15:31:05 [2025-03-02 15:31:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592064', 'tblTempUsageDetail_20' ) start [2025-03-02 15:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592064', 'tblTempUsageDetail_20' ) end [2025-03-02 15:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592064', 'tblTempVendorCDR_20' ) start [2025-03-02 15:31:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592064', 'tblTempVendorCDR_20' ) end [2025-03-02 15:31:18] Production.INFO: ProcessCDR(1,14592064,1,1,2) [2025-03-02 15:31:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592064,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:31:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592064,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:31:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592064,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:31:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592064,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:31:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592064', 'tblTempUsageDetail_20' ) start [2025-03-02 15:31:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592064', 'tblTempUsageDetail_20' ) end [2025-03-02 15:31:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:31:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:31:23] Production.INFO: ==31807== Releasing lock... [2025-03-02 15:31:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:31:23] Production.INFO: 46 MB #Memory Used# [2025-03-02 15:32:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:32:05 [end_date_ymd] => 2025-03-02 15:32:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:32:05' and `end` < '2025-03-02 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-03-02 15:32:18] Production.INFO: count ==2433 [2025-03-02 15:32:19] Production.ERROR: pbx CDR StartTime 2025-03-02 12:32:05 - End Time 2025-03-02 15:32:05 [2025-03-02 15:32:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:32:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592069', 'tblTempUsageDetail_20' ) start [2025-03-02 15:32:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592069', 'tblTempUsageDetail_20' ) end [2025-03-02 15:32:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592069', 'tblTempVendorCDR_20' ) start [2025-03-02 15:32:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592069', 'tblTempVendorCDR_20' ) end [2025-03-02 15:32:19] Production.INFO: ProcessCDR(1,14592069,1,1,2) [2025-03-02 15:32:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592069,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:32:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592069,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:32:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592069,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:32:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592069,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:32:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592069', 'tblTempUsageDetail_20' ) start [2025-03-02 15:32:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592069', 'tblTempUsageDetail_20' ) end [2025-03-02 15:32:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:32:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:32:23] Production.INFO: ==31900== Releasing lock... [2025-03-02 15:32:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:32:23] Production.INFO: 46.25 MB #Memory Used# [2025-03-02 15:33:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:33:05 [end_date_ymd] => 2025-03-02 15:33:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:33:05' and `end` < '2025-03-02 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-03-02 15:33:17] Production.INFO: count ==2482 [2025-03-02 15:33:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:33:05 - End Time 2025-03-02 15:33:05 [2025-03-02 15:33:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592074', 'tblTempUsageDetail_20' ) start [2025-03-02 15:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592074', 'tblTempUsageDetail_20' ) end [2025-03-02 15:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592074', 'tblTempVendorCDR_20' ) start [2025-03-02 15:33:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592074', 'tblTempVendorCDR_20' ) end [2025-03-02 15:33:18] Production.INFO: ProcessCDR(1,14592074,1,1,2) [2025-03-02 15:33:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592074,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:33:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592074,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:33:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592074,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:33:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592074,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:33:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592074', 'tblTempUsageDetail_20' ) start [2025-03-02 15:33:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592074', 'tblTempUsageDetail_20' ) end [2025-03-02 15:33:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:33:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:33:23] Production.INFO: ==32014== Releasing lock... [2025-03-02 15:33:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:33:23] Production.INFO: 46.5 MB #Memory Used# [2025-03-02 15:34:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:34:05 [end_date_ymd] => 2025-03-02 15:34:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:34:05' and `end` < '2025-03-02 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-03-02 15:34:17] Production.INFO: count ==2526 [2025-03-02 15:34:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:34:05 - End Time 2025-03-02 15:34:05 [2025-03-02 15:34:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592079', 'tblTempUsageDetail_20' ) start [2025-03-02 15:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592079', 'tblTempUsageDetail_20' ) end [2025-03-02 15:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592079', 'tblTempVendorCDR_20' ) start [2025-03-02 15:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592079', 'tblTempVendorCDR_20' ) end [2025-03-02 15:34:18] Production.INFO: ProcessCDR(1,14592079,1,1,2) [2025-03-02 15:34:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592079,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:34:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592079,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:34:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592079,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:34:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592079,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:34:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592079', 'tblTempUsageDetail_20' ) start [2025-03-02 15:34:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592079', 'tblTempUsageDetail_20' ) end [2025-03-02 15:34:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:34:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:34:23] Production.INFO: ==32113== Releasing lock... [2025-03-02 15:34:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:34:23] Production.INFO: 47 MB #Memory Used# [2025-03-02 15:35:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:35:06 [end_date_ymd] => 2025-03-02 15:35:06 [RateCDR] => 1 ) [2025-03-02 15: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-03-02 12:35:06' and `end` < '2025-03-02 15: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-03-02 15:35:18] Production.INFO: count ==2552 [2025-03-02 15:35:19] Production.ERROR: pbx CDR StartTime 2025-03-02 12:35:06 - End Time 2025-03-02 15:35:06 [2025-03-02 15:35:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:35:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592084', 'tblTempUsageDetail_20' ) start [2025-03-02 15:35:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592084', 'tblTempUsageDetail_20' ) end [2025-03-02 15:35:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592084', 'tblTempVendorCDR_20' ) start [2025-03-02 15:35:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592084', 'tblTempVendorCDR_20' ) end [2025-03-02 15:35:19] Production.INFO: ProcessCDR(1,14592084,1,1,2) [2025-03-02 15:35:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592084,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:35:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592084,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:35:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592084,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:35:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592084,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:35:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592084', 'tblTempUsageDetail_20' ) start [2025-03-02 15:35:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592084', 'tblTempUsageDetail_20' ) end [2025-03-02 15:35:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:35:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:35:24] Production.INFO: ==32226== Releasing lock... [2025-03-02 15:35:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:35:24] Production.INFO: 47.5 MB #Memory Used# [2025-03-02 15:36:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:36:05 [end_date_ymd] => 2025-03-02 15:36:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:36:05' and `end` < '2025-03-02 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-03-02 15:36:17] Production.INFO: count ==2855 [2025-03-02 15:36:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:36:05 - End Time 2025-03-02 15:36:05 [2025-03-02 15:36:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:36:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592089', 'tblTempUsageDetail_20' ) start [2025-03-02 15:36:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592089', 'tblTempUsageDetail_20' ) end [2025-03-02 15:36:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592089', 'tblTempVendorCDR_20' ) start [2025-03-02 15:36:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592089', 'tblTempVendorCDR_20' ) end [2025-03-02 15:36:19] Production.INFO: ProcessCDR(1,14592089,1,1,2) [2025-03-02 15:36:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592089,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:36:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592089,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:36:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592089,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:36:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592089,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:36:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592089', 'tblTempUsageDetail_20' ) start [2025-03-02 15:36:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592089', 'tblTempUsageDetail_20' ) end [2025-03-02 15:36:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:36:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:36:24] Production.INFO: ==32355== Releasing lock... [2025-03-02 15:36:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:36:24] Production.INFO: 49.5 MB #Memory Used# [2025-03-02 15:37:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:37:06 [end_date_ymd] => 2025-03-02 15:37:06 [RateCDR] => 1 ) [2025-03-02 15: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-03-02 12:37:06' and `end` < '2025-03-02 15: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-03-02 15:37:18] Production.INFO: count ==2901 [2025-03-02 15:37:19] Production.ERROR: pbx CDR StartTime 2025-03-02 12:37:06 - End Time 2025-03-02 15:37:06 [2025-03-02 15:37:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:37:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592094', 'tblTempUsageDetail_20' ) start [2025-03-02 15:37:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592094', 'tblTempUsageDetail_20' ) end [2025-03-02 15:37:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592094', 'tblTempVendorCDR_20' ) start [2025-03-02 15:37:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592094', 'tblTempVendorCDR_20' ) end [2025-03-02 15:37:19] Production.INFO: ProcessCDR(1,14592094,1,1,2) [2025-03-02 15:37:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592094,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:37:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592094,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:37:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592094,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:37:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592094,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:37:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592094', 'tblTempUsageDetail_20' ) start [2025-03-02 15:37:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592094', 'tblTempUsageDetail_20' ) end [2025-03-02 15:37:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:37:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:37:24] Production.INFO: ==32457== Releasing lock... [2025-03-02 15:37:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:37:24] Production.INFO: 49.75 MB #Memory Used# [2025-03-02 15:38:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:38:05 [end_date_ymd] => 2025-03-02 15:38:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:38:05' and `end` < '2025-03-02 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-03-02 15:38:17] Production.INFO: count ==2989 [2025-03-02 15:38:19] Production.ERROR: pbx CDR StartTime 2025-03-02 12:38:05 - End Time 2025-03-02 15:38:05 [2025-03-02 15:38:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:38:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592099', 'tblTempUsageDetail_20' ) start [2025-03-02 15:38:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592099', 'tblTempUsageDetail_20' ) end [2025-03-02 15:38:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592099', 'tblTempVendorCDR_20' ) start [2025-03-02 15:38:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592099', 'tblTempVendorCDR_20' ) end [2025-03-02 15:38:19] Production.INFO: ProcessCDR(1,14592099,1,1,2) [2025-03-02 15:38:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592099,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:38:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592099,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:38:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592099,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:38:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592099,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:38:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592099', 'tblTempUsageDetail_20' ) start [2025-03-02 15:38:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592099', 'tblTempUsageDetail_20' ) end [2025-03-02 15:38:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:38:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:38:24] Production.INFO: ==32555== Releasing lock... [2025-03-02 15:38:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:38:24] Production.INFO: 51 MB #Memory Used# [2025-03-02 15:39:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:39:05 [end_date_ymd] => 2025-03-02 15:39:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:39:05' and `end` < '2025-03-02 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-03-02 15:39:18] Production.INFO: count ==2989 [2025-03-02 15:39:19] Production.ERROR: pbx CDR StartTime 2025-03-02 12:39:05 - End Time 2025-03-02 15:39:05 [2025-03-02 15:39:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:39:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592104', 'tblTempUsageDetail_20' ) start [2025-03-02 15:39:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592104', 'tblTempUsageDetail_20' ) end [2025-03-02 15:39:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592104', 'tblTempVendorCDR_20' ) start [2025-03-02 15:39:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592104', 'tblTempVendorCDR_20' ) end [2025-03-02 15:39:19] Production.INFO: ProcessCDR(1,14592104,1,1,2) [2025-03-02 15:39:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592104,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:39:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592104,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:39:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592104,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:39:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592104,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:39:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592104', 'tblTempUsageDetail_20' ) start [2025-03-02 15:39:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592104', 'tblTempUsageDetail_20' ) end [2025-03-02 15:39:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:39:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:39:24] Production.INFO: ==32656== Releasing lock... [2025-03-02 15:39:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:39:24] Production.INFO: 50.75 MB #Memory Used# [2025-03-02 15:40:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:40:06 [end_date_ymd] => 2025-03-02 15:40:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:40:06' and `end` < '2025-03-02 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-03-02 15:40:18] Production.INFO: count ==2996 [2025-03-02 15:40:19] Production.ERROR: pbx CDR StartTime 2025-03-02 12:40:06 - End Time 2025-03-02 15:40:06 [2025-03-02 15:40:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592109', 'tblTempUsageDetail_20' ) start [2025-03-02 15:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592109', 'tblTempUsageDetail_20' ) end [2025-03-02 15:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592109', 'tblTempVendorCDR_20' ) start [2025-03-02 15:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592109', 'tblTempVendorCDR_20' ) end [2025-03-02 15:40:19] Production.INFO: ProcessCDR(1,14592109,1,1,2) [2025-03-02 15:40:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592109,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:40:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592109,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:40:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592109,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:40:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592109,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:40:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592109', 'tblTempUsageDetail_20' ) start [2025-03-02 15:40:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592109', 'tblTempUsageDetail_20' ) end [2025-03-02 15:40:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:40:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:40:24] Production.INFO: ==32759== Releasing lock... [2025-03-02 15:40:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:40:24] Production.INFO: 50.75 MB #Memory Used# [2025-03-02 15:41:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:41:05 [end_date_ymd] => 2025-03-02 15:41:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:41:05' and `end` < '2025-03-02 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-03-02 15:41:18] Production.INFO: count ==2996 [2025-03-02 15:41:19] Production.ERROR: pbx CDR StartTime 2025-03-02 12:41:05 - End Time 2025-03-02 15:41:05 [2025-03-02 15:41:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:41:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592115', 'tblTempUsageDetail_20' ) start [2025-03-02 15:41:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592115', 'tblTempUsageDetail_20' ) end [2025-03-02 15:41:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592115', 'tblTempVendorCDR_20' ) start [2025-03-02 15:41:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592115', 'tblTempVendorCDR_20' ) end [2025-03-02 15:41:19] Production.INFO: ProcessCDR(1,14592115,1,1,2) [2025-03-02 15:41:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592115,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:41:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592115,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:41:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592115,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:41:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592115,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:41:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592115', 'tblTempUsageDetail_20' ) start [2025-03-02 15:41:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592115', 'tblTempUsageDetail_20' ) end [2025-03-02 15:41:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:41:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:41:24] Production.INFO: ==415== Releasing lock... [2025-03-02 15:41:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:41:24] Production.INFO: 50.75 MB #Memory Used# [2025-03-02 15:42:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:42:05 [end_date_ymd] => 2025-03-02 15:42:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:42:05' and `end` < '2025-03-02 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-03-02 15:42:17] Production.INFO: count ==2996 [2025-03-02 15:42:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:42:05 - End Time 2025-03-02 15:42:05 [2025-03-02 15:42:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:42:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592120', 'tblTempUsageDetail_20' ) start [2025-03-02 15:42:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592120', 'tblTempUsageDetail_20' ) end [2025-03-02 15:42:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592120', 'tblTempVendorCDR_20' ) start [2025-03-02 15:42:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592120', 'tblTempVendorCDR_20' ) end [2025-03-02 15:42:19] Production.INFO: ProcessCDR(1,14592120,1,1,2) [2025-03-02 15:42:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592120,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:42:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592120,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:42:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592120,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:42:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592120,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:42:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592120', 'tblTempUsageDetail_20' ) start [2025-03-02 15:42:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592120', 'tblTempUsageDetail_20' ) end [2025-03-02 15:42:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:42:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:42:23] Production.INFO: ==519== Releasing lock... [2025-03-02 15:42:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:42:23] Production.INFO: 50.5 MB #Memory Used# [2025-03-02 15:43:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:43:06 [end_date_ymd] => 2025-03-02 15:43:06 [RateCDR] => 1 ) [2025-03-02 15: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-03-02 12:43:06' and `end` < '2025-03-02 15: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-03-02 15:43:18] Production.INFO: count ==2998 [2025-03-02 15:43:19] Production.ERROR: pbx CDR StartTime 2025-03-02 12:43:06 - End Time 2025-03-02 15:43:06 [2025-03-02 15:43:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:43:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592125', 'tblTempUsageDetail_20' ) start [2025-03-02 15:43:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592125', 'tblTempUsageDetail_20' ) end [2025-03-02 15:43:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592125', 'tblTempVendorCDR_20' ) start [2025-03-02 15:43:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592125', 'tblTempVendorCDR_20' ) end [2025-03-02 15:43:19] Production.INFO: ProcessCDR(1,14592125,1,1,2) [2025-03-02 15:43:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592125,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:43:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592125,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:43:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592125,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:43:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592125,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:43:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592125', 'tblTempUsageDetail_20' ) start [2025-03-02 15:43:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592125', 'tblTempUsageDetail_20' ) end [2025-03-02 15:43:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:43:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:43:24] Production.INFO: ==612== Releasing lock... [2025-03-02 15:43:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:43:24] Production.INFO: 50.5 MB #Memory Used# [2025-03-02 15:44:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:44:05 [end_date_ymd] => 2025-03-02 15:44:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:44:05' and `end` < '2025-03-02 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-03-02 15:44:17] Production.INFO: count ==3002 [2025-03-02 15:44:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:44:05 - End Time 2025-03-02 15:44:05 [2025-03-02 15:44:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592130', 'tblTempUsageDetail_20' ) start [2025-03-02 15:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592130', 'tblTempUsageDetail_20' ) end [2025-03-02 15:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592130', 'tblTempVendorCDR_20' ) start [2025-03-02 15:44:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592130', 'tblTempVendorCDR_20' ) end [2025-03-02 15:44:18] Production.INFO: ProcessCDR(1,14592130,1,1,2) [2025-03-02 15:44:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592130,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:44:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592130,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:44:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592130,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:44:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592130,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:44:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592130', 'tblTempUsageDetail_20' ) start [2025-03-02 15:44:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592130', 'tblTempUsageDetail_20' ) end [2025-03-02 15:44:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:44:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:44:23] Production.INFO: ==729== Releasing lock... [2025-03-02 15:44:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:44:23] Production.INFO: 50.5 MB #Memory Used# [2025-03-02 15:45:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:45:05 [end_date_ymd] => 2025-03-02 15:45:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:45:05' and `end` < '2025-03-02 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-03-02 15:45:17] Production.INFO: count ==3005 [2025-03-02 15:45:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:45:05 - End Time 2025-03-02 15:45:05 [2025-03-02 15:45:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:45:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592135', 'tblTempUsageDetail_20' ) start [2025-03-02 15:45:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592135', 'tblTempUsageDetail_20' ) end [2025-03-02 15:45:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592135', 'tblTempVendorCDR_20' ) start [2025-03-02 15:45:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592135', 'tblTempVendorCDR_20' ) end [2025-03-02 15:45:18] Production.INFO: ProcessCDR(1,14592135,1,1,2) [2025-03-02 15:45:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592135,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:45:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592135,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:45:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592135,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:45:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592135,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:45:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592135', 'tblTempUsageDetail_20' ) start [2025-03-02 15:45:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592135', 'tblTempUsageDetail_20' ) end [2025-03-02 15:45:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:45:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:45:23] Production.INFO: ==843== Releasing lock... [2025-03-02 15:45:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:45:23] Production.INFO: 50.5 MB #Memory Used# [2025-03-02 15:46:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:46:05 [end_date_ymd] => 2025-03-02 15:46:05 [RateCDR] => 1 ) [2025-03-02 15: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-03-02 12:46:05' and `end` < '2025-03-02 15: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-03-02 15:46:18] Production.INFO: count ==3005 [2025-03-02 15:46:19] Production.ERROR: pbx CDR StartTime 2025-03-02 12:46:05 - End Time 2025-03-02 15:46:05 [2025-03-02 15:46:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:46:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592140', 'tblTempUsageDetail_20' ) start [2025-03-02 15:46:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592140', 'tblTempUsageDetail_20' ) end [2025-03-02 15:46:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592140', 'tblTempVendorCDR_20' ) start [2025-03-02 15:46:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592140', 'tblTempVendorCDR_20' ) end [2025-03-02 15:46:19] Production.INFO: ProcessCDR(1,14592140,1,1,2) [2025-03-02 15:46:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592140,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:46:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592140,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:46:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592140,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:46:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592140,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:46:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592140', 'tblTempUsageDetail_20' ) start [2025-03-02 15:46:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592140', 'tblTempUsageDetail_20' ) end [2025-03-02 15:46:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:46:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:46:23] Production.INFO: ==954== Releasing lock... [2025-03-02 15:46:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:46:23] Production.INFO: 50.5 MB #Memory Used# [2025-03-02 15:47:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:47:05 [end_date_ymd] => 2025-03-02 15:47:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:47:05' and `end` < '2025-03-02 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-03-02 15:47:17] Production.INFO: count ==3010 [2025-03-02 15:47:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:47:05 - End Time 2025-03-02 15:47:05 [2025-03-02 15:47:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592145', 'tblTempUsageDetail_20' ) start [2025-03-02 15:47:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592145', 'tblTempUsageDetail_20' ) end [2025-03-02 15:47:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592145', 'tblTempVendorCDR_20' ) start [2025-03-02 15:47:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592145', 'tblTempVendorCDR_20' ) end [2025-03-02 15:47:19] Production.INFO: ProcessCDR(1,14592145,1,1,2) [2025-03-02 15:47:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592145,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:47:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592145,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:47:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592145,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:47:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592145,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:47:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592145', 'tblTempUsageDetail_20' ) start [2025-03-02 15:47:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592145', 'tblTempUsageDetail_20' ) end [2025-03-02 15:47:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:47:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:47:23] Production.INFO: ==1074== Releasing lock... [2025-03-02 15:47:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:47:23] Production.INFO: 50.75 MB #Memory Used# [2025-03-02 15:48:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:48:06 [end_date_ymd] => 2025-03-02 15:48:06 [RateCDR] => 1 ) [2025-03-02 15: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-03-02 12:48:06' and `end` < '2025-03-02 15: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-03-02 15:48:18] Production.INFO: count ==3014 [2025-03-02 15:48:20] Production.ERROR: pbx CDR StartTime 2025-03-02 12:48:06 - End Time 2025-03-02 15:48:06 [2025-03-02 15:48:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:48:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592150', 'tblTempUsageDetail_20' ) start [2025-03-02 15:48:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592150', 'tblTempUsageDetail_20' ) end [2025-03-02 15:48:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592150', 'tblTempVendorCDR_20' ) start [2025-03-02 15:48:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592150', 'tblTempVendorCDR_20' ) end [2025-03-02 15:48:20] Production.INFO: ProcessCDR(1,14592150,1,1,2) [2025-03-02 15:48:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592150,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:48:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592150,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:48:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592150,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:48:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592150,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:48:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592150', 'tblTempUsageDetail_20' ) start [2025-03-02 15:48:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592150', 'tblTempUsageDetail_20' ) end [2025-03-02 15:48:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:48:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:48:24] Production.INFO: ==1188== Releasing lock... [2025-03-02 15:48:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:48:24] Production.INFO: 51 MB #Memory Used# [2025-03-02 15:49:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:49:05 [end_date_ymd] => 2025-03-02 15:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:49:05' and `end` < '2025-03-02 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-03-02 15:49:17] Production.INFO: count ==3014 [2025-03-02 15:49:19] Production.ERROR: pbx CDR StartTime 2025-03-02 12:49:05 - End Time 2025-03-02 15:49:05 [2025-03-02 15:49:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:49:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592155', 'tblTempUsageDetail_20' ) start [2025-03-02 15:49:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592155', 'tblTempUsageDetail_20' ) end [2025-03-02 15:49:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592155', 'tblTempVendorCDR_20' ) start [2025-03-02 15:49:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592155', 'tblTempVendorCDR_20' ) end [2025-03-02 15:49:19] Production.INFO: ProcessCDR(1,14592155,1,1,2) [2025-03-02 15:49:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592155,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:49:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592155,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:49:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592155,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:49:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592155,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:49:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592155', 'tblTempUsageDetail_20' ) start [2025-03-02 15:49:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592155', 'tblTempUsageDetail_20' ) end [2025-03-02 15:49:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:49:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:49:23] Production.INFO: ==1324== Releasing lock... [2025-03-02 15:49:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:49:23] Production.INFO: 51 MB #Memory Used# [2025-03-02 15:50:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:50:06 [end_date_ymd] => 2025-03-02 15:50:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:50:06' and `end` < '2025-03-02 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-03-02 15:50:18] Production.INFO: count ==3018 [2025-03-02 15:50:19] Production.ERROR: pbx CDR StartTime 2025-03-02 12:50:06 - End Time 2025-03-02 15:50:06 [2025-03-02 15:50:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592161', 'tblTempUsageDetail_20' ) start [2025-03-02 15:50:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592161', 'tblTempUsageDetail_20' ) end [2025-03-02 15:50:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592161', 'tblTempVendorCDR_20' ) start [2025-03-02 15:50:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592161', 'tblTempVendorCDR_20' ) end [2025-03-02 15:50:20] Production.INFO: ProcessCDR(1,14592161,1,1,2) [2025-03-02 15:50:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592161,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:50:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592161,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:50:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592161,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:50:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592161,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:50:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592161', 'tblTempUsageDetail_20' ) start [2025-03-02 15:50:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592161', 'tblTempUsageDetail_20' ) end [2025-03-02 15:50:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:50:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:50:25] Production.INFO: ==1456== Releasing lock... [2025-03-02 15:50:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:50:25] Production.INFO: 50.75 MB #Memory Used# [2025-03-02 15:51:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:51:05 [end_date_ymd] => 2025-03-02 15:51:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:51:05' and `end` < '2025-03-02 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-03-02 15:51:17] Production.INFO: count ==3056 [2025-03-02 15:51:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:51:05 - End Time 2025-03-02 15:51:05 [2025-03-02 15:51:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592166', 'tblTempUsageDetail_20' ) start [2025-03-02 15:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592166', 'tblTempUsageDetail_20' ) end [2025-03-02 15:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592166', 'tblTempVendorCDR_20' ) start [2025-03-02 15:51:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592166', 'tblTempVendorCDR_20' ) end [2025-03-02 15:51:18] Production.INFO: ProcessCDR(1,14592166,1,1,2) [2025-03-02 15:51:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592166,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:51:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592166,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:51:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592166,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:51:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592166,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:51:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592166', 'tblTempUsageDetail_20' ) start [2025-03-02 15:51:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592166', 'tblTempUsageDetail_20' ) end [2025-03-02 15:51:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:51:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:51:23] Production.INFO: ==1643== Releasing lock... [2025-03-02 15:51:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:51:23] Production.INFO: 51 MB #Memory Used# [2025-03-02 15:52:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:52:06 [end_date_ymd] => 2025-03-02 15:52:06 [RateCDR] => 1 ) [2025-03-02 15: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-03-02 12:52:06' and `end` < '2025-03-02 15: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-03-02 15:52:18] Production.INFO: count ==3054 [2025-03-02 15:52:20] Production.ERROR: pbx CDR StartTime 2025-03-02 12:52:06 - End Time 2025-03-02 15:52:06 [2025-03-02 15:52:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:52:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592171', 'tblTempUsageDetail_20' ) start [2025-03-02 15:52:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592171', 'tblTempUsageDetail_20' ) end [2025-03-02 15:52:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592171', 'tblTempVendorCDR_20' ) start [2025-03-02 15:52:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592171', 'tblTempVendorCDR_20' ) end [2025-03-02 15:52:20] Production.INFO: ProcessCDR(1,14592171,1,1,2) [2025-03-02 15:52:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592171,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:52:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592171,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:52:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592171,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:52:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592171,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:52:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592171', 'tblTempUsageDetail_20' ) start [2025-03-02 15:52:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592171', 'tblTempUsageDetail_20' ) end [2025-03-02 15:52:25] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:52:25] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:52:25] Production.INFO: ==1759== Releasing lock... [2025-03-02 15:52:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:52:25] Production.INFO: 51.25 MB #Memory Used# [2025-03-02 15:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:53:05 [end_date_ymd] => 2025-03-02 15:53:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:53:05' and `end` < '2025-03-02 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-03-02 15:53:18] Production.INFO: count ==3060 [2025-03-02 15:53:19] Production.ERROR: pbx CDR StartTime 2025-03-02 12:53:05 - End Time 2025-03-02 15:53:05 [2025-03-02 15:53:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:53:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592176', 'tblTempUsageDetail_20' ) start [2025-03-02 15:53:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592176', 'tblTempUsageDetail_20' ) end [2025-03-02 15:53:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592176', 'tblTempVendorCDR_20' ) start [2025-03-02 15:53:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592176', 'tblTempVendorCDR_20' ) end [2025-03-02 15:53:19] Production.INFO: ProcessCDR(1,14592176,1,1,2) [2025-03-02 15:53:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592176,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:53:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592176,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:53:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592176,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:53:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592176,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:53:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592176', 'tblTempUsageDetail_20' ) start [2025-03-02 15:53:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592176', 'tblTempUsageDetail_20' ) end [2025-03-02 15:53:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:53:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:53:24] Production.INFO: ==1876== Releasing lock... [2025-03-02 15:53:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:53:24] Production.INFO: 51.25 MB #Memory Used# [2025-03-02 15:54:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:54:06 [end_date_ymd] => 2025-03-02 15:54:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:54:06' and `end` < '2025-03-02 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-03-02 15:54:18] Production.INFO: count ==3092 [2025-03-02 15:54:19] Production.ERROR: pbx CDR StartTime 2025-03-02 12:54:06 - End Time 2025-03-02 15:54:06 [2025-03-02 15:54:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:54:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592181', 'tblTempUsageDetail_20' ) start [2025-03-02 15:54:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592181', 'tblTempUsageDetail_20' ) end [2025-03-02 15:54:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592181', 'tblTempVendorCDR_20' ) start [2025-03-02 15:54:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592181', 'tblTempVendorCDR_20' ) end [2025-03-02 15:54:20] Production.INFO: ProcessCDR(1,14592181,1,1,2) [2025-03-02 15:54:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592181,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:54:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592181,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:54:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592181,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:54:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592181,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:54:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592181', 'tblTempUsageDetail_20' ) start [2025-03-02 15:54:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592181', 'tblTempUsageDetail_20' ) end [2025-03-02 15:54:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:54:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:54:24] Production.INFO: ==1988== Releasing lock... [2025-03-02 15:54:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:54:24] Production.INFO: 51 MB #Memory Used# [2025-03-02 15:55:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:55:05 [end_date_ymd] => 2025-03-02 15:55:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:55:05' and `end` < '2025-03-02 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-03-02 15:55:18] Production.INFO: count ==3094 [2025-03-02 15:55:19] Production.ERROR: pbx CDR StartTime 2025-03-02 12:55:05 - End Time 2025-03-02 15:55:05 [2025-03-02 15:55:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:55:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592186', 'tblTempUsageDetail_20' ) start [2025-03-02 15:55:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592186', 'tblTempUsageDetail_20' ) end [2025-03-02 15:55:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592186', 'tblTempVendorCDR_20' ) start [2025-03-02 15:55:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592186', 'tblTempVendorCDR_20' ) end [2025-03-02 15:55:19] Production.INFO: ProcessCDR(1,14592186,1,1,2) [2025-03-02 15:55:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592186,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:55:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592186,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:55:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592186,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:55:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592186,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:55:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592186', 'tblTempUsageDetail_20' ) start [2025-03-02 15:55:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592186', 'tblTempUsageDetail_20' ) end [2025-03-02 15:55:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:55:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:55:24] Production.INFO: ==2101== Releasing lock... [2025-03-02 15:55:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:55:24] Production.INFO: 51.25 MB #Memory Used# [2025-03-02 15:56:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:56:06 [end_date_ymd] => 2025-03-02 15:56:06 [RateCDR] => 1 ) [2025-03-02 15: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-03-02 12:56:06' and `end` < '2025-03-02 15: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-03-02 15:56:18] Production.INFO: count ==3090 [2025-03-02 15:56:20] Production.ERROR: pbx CDR StartTime 2025-03-02 12:56:06 - End Time 2025-03-02 15:56:06 [2025-03-02 15:56:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:56:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592191', 'tblTempUsageDetail_20' ) start [2025-03-02 15:56:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592191', 'tblTempUsageDetail_20' ) end [2025-03-02 15:56:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592191', 'tblTempVendorCDR_20' ) start [2025-03-02 15:56:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592191', 'tblTempVendorCDR_20' ) end [2025-03-02 15:56:20] Production.INFO: ProcessCDR(1,14592191,1,1,2) [2025-03-02 15:56:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592191,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:56:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592191,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:56:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592191,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:56:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592191,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:56:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592191', 'tblTempUsageDetail_20' ) start [2025-03-02 15:56:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592191', 'tblTempUsageDetail_20' ) end [2025-03-02 15:56:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:56:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:56:24] Production.INFO: ==2210== Releasing lock... [2025-03-02 15:56:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:56:24] Production.INFO: 51.25 MB #Memory Used# [2025-03-02 15:57:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:57:05 [end_date_ymd] => 2025-03-02 15:57:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:57:05' and `end` < '2025-03-02 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-03-02 15:57:17] Production.INFO: count ==3091 [2025-03-02 15:57:18] Production.ERROR: pbx CDR StartTime 2025-03-02 12:57:05 - End Time 2025-03-02 15:57:05 [2025-03-02 15:57:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:57:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592196', 'tblTempUsageDetail_20' ) start [2025-03-02 15:57:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592196', 'tblTempUsageDetail_20' ) end [2025-03-02 15:57:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592196', 'tblTempVendorCDR_20' ) start [2025-03-02 15:57:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592196', 'tblTempVendorCDR_20' ) end [2025-03-02 15:57:19] Production.INFO: ProcessCDR(1,14592196,1,1,2) [2025-03-02 15:57:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592196,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:57:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592196,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:57:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592196,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:57:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592196,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:57:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592196', 'tblTempUsageDetail_20' ) start [2025-03-02 15:57:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592196', 'tblTempUsageDetail_20' ) end [2025-03-02 15:57:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:57:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:57:23] Production.INFO: ==2326== Releasing lock... [2025-03-02 15:57:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:57:23] Production.INFO: 51.25 MB #Memory Used# [2025-03-02 15:58:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:58:06 [end_date_ymd] => 2025-03-02 15:58:06 [RateCDR] => 1 ) [2025-03-02 15: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-03-02 12:58:06' and `end` < '2025-03-02 15: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-03-02 15:58:18] Production.INFO: count ==3092 [2025-03-02 15:58:19] Production.ERROR: pbx CDR StartTime 2025-03-02 12:58:06 - End Time 2025-03-02 15:58:06 [2025-03-02 15:58:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:58:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592201', 'tblTempUsageDetail_20' ) start [2025-03-02 15:58:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592201', 'tblTempUsageDetail_20' ) end [2025-03-02 15:58:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592201', 'tblTempVendorCDR_20' ) start [2025-03-02 15:58:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592201', 'tblTempVendorCDR_20' ) end [2025-03-02 15:58:20] Production.INFO: ProcessCDR(1,14592201,1,1,2) [2025-03-02 15:58:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592201,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:58:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592201,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:58:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592201,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:58:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592201,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:58:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592201', 'tblTempUsageDetail_20' ) start [2025-03-02 15:58:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592201', 'tblTempUsageDetail_20' ) end [2025-03-02 15:58:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:58:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:58:24] Production.INFO: ==2447== Releasing lock... [2025-03-02 15:58:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:58:24] Production.INFO: 51.5 MB #Memory Used# [2025-03-02 15:59:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 12:59:05 [end_date_ymd] => 2025-03-02 15:59:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 12:59:05' and `end` < '2025-03-02 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-03-02 15:59:17] Production.INFO: count ==3082 [2025-03-02 15:59:19] Production.ERROR: pbx CDR StartTime 2025-03-02 12:59:05 - End Time 2025-03-02 15:59:05 [2025-03-02 15:59:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 15:59:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592206', 'tblTempUsageDetail_20' ) start [2025-03-02 15:59:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592206', 'tblTempUsageDetail_20' ) end [2025-03-02 15:59:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592206', 'tblTempVendorCDR_20' ) start [2025-03-02 15:59:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592206', 'tblTempVendorCDR_20' ) end [2025-03-02 15:59:19] Production.INFO: ProcessCDR(1,14592206,1,1,2) [2025-03-02 15:59:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592206,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:59:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592206,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 15:59:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592206,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:59:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592206,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 15:59:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592206', 'tblTempUsageDetail_20' ) start [2025-03-02 15:59:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592206', 'tblTempUsageDetail_20' ) end [2025-03-02 15:59:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 15:59:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 15:59:23] Production.INFO: ==2564== Releasing lock... [2025-03-02 15:59:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 15:59:23] Production.INFO: 51 MB #Memory Used# [2025-03-02 16:00:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:00:06 [end_date_ymd] => 2025-03-02 16:00:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:00:06' and `end` < '2025-03-02 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-03-02 16:00:18] Production.INFO: count ==3082 [2025-03-02 16:00:20] Production.ERROR: pbx CDR StartTime 2025-03-02 13:00:06 - End Time 2025-03-02 16:00:06 [2025-03-02 16:00:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:00:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592212', 'tblTempUsageDetail_20' ) start [2025-03-02 16:00:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592212', 'tblTempUsageDetail_20' ) end [2025-03-02 16:00:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592212', 'tblTempVendorCDR_20' ) start [2025-03-02 16:00:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592212', 'tblTempVendorCDR_20' ) end [2025-03-02 16:00:20] Production.INFO: ProcessCDR(1,14592212,1,1,2) [2025-03-02 16:00:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592212,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:00:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592212,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:00:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592212,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:00:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592212,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:00:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592212', 'tblTempUsageDetail_20' ) start [2025-03-02 16:00:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592212', 'tblTempUsageDetail_20' ) end [2025-03-02 16:00:25] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:00:25] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:00:25] Production.INFO: ==2685== Releasing lock... [2025-03-02 16:00:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:00:25] Production.INFO: 51.25 MB #Memory Used# [2025-03-02 16:01:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:01:05 [end_date_ymd] => 2025-03-02 16:01:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:01:05' and `end` < '2025-03-02 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-03-02 16:01:17] Production.INFO: count ==3099 [2025-03-02 16:01:18] Production.ERROR: pbx CDR StartTime 2025-03-02 13:01:05 - End Time 2025-03-02 16:01:05 [2025-03-02 16:01:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592217', 'tblTempUsageDetail_20' ) start [2025-03-02 16:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592217', 'tblTempUsageDetail_20' ) end [2025-03-02 16:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592217', 'tblTempVendorCDR_20' ) start [2025-03-02 16:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592217', 'tblTempVendorCDR_20' ) end [2025-03-02 16:01:18] Production.INFO: ProcessCDR(1,14592217,1,1,2) [2025-03-02 16:01:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592217,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:01:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592217,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:01:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592217,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:01:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592217,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:01:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592217', 'tblTempUsageDetail_20' ) start [2025-03-02 16:01:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592217', 'tblTempUsageDetail_20' ) end [2025-03-02 16:01:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:01:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:01:23] Production.INFO: ==2802== Releasing lock... [2025-03-02 16:01:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:01:23] Production.INFO: 51.75 MB #Memory Used# [2025-03-02 16:02:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:02:06 [end_date_ymd] => 2025-03-02 16:02:06 [RateCDR] => 1 ) [2025-03-02 16: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-03-02 13:02:06' and `end` < '2025-03-02 16: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-03-02 16:02:18] Production.INFO: count ==3102 [2025-03-02 16:02:20] Production.ERROR: pbx CDR StartTime 2025-03-02 13:02:06 - End Time 2025-03-02 16:02:06 [2025-03-02 16:02:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:02:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592222', 'tblTempUsageDetail_20' ) start [2025-03-02 16:02:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592222', 'tblTempUsageDetail_20' ) end [2025-03-02 16:02:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592222', 'tblTempVendorCDR_20' ) start [2025-03-02 16:02:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592222', 'tblTempVendorCDR_20' ) end [2025-03-02 16:02:20] Production.INFO: ProcessCDR(1,14592222,1,1,2) [2025-03-02 16:02:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592222,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:02:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592222,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:02:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592222,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:02:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592222,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:02:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592222', 'tblTempUsageDetail_20' ) start [2025-03-02 16:02:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592222', 'tblTempUsageDetail_20' ) end [2025-03-02 16:02:25] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:02:25] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:02:25] Production.INFO: ==2905== Releasing lock... [2025-03-02 16:02:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:02:25] Production.INFO: 51 MB #Memory Used# [2025-03-02 16:03:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:03:05 [end_date_ymd] => 2025-03-02 16:03:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:03:05' and `end` < '2025-03-02 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-03-02 16:03:17] Production.INFO: count ==3099 [2025-03-02 16:03:18] Production.ERROR: pbx CDR StartTime 2025-03-02 13:03:05 - End Time 2025-03-02 16:03:05 [2025-03-02 16:03:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592227', 'tblTempUsageDetail_20' ) start [2025-03-02 16:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592227', 'tblTempUsageDetail_20' ) end [2025-03-02 16:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592227', 'tblTempVendorCDR_20' ) start [2025-03-02 16:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592227', 'tblTempVendorCDR_20' ) end [2025-03-02 16:03:18] Production.INFO: ProcessCDR(1,14592227,1,1,2) [2025-03-02 16:03:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592227,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:03:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592227,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:03:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592227,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:03:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592227,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:03:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592227', 'tblTempUsageDetail_20' ) start [2025-03-02 16:03:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592227', 'tblTempUsageDetail_20' ) end [2025-03-02 16:03:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:03:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:03:23] Production.INFO: ==3007== Releasing lock... [2025-03-02 16:03:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:03:23] Production.INFO: 51.5 MB #Memory Used# [2025-03-02 16:04:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:04:06 [end_date_ymd] => 2025-03-02 16:04:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:04:06' and `end` < '2025-03-02 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-03-02 16:04:18] Production.INFO: count ==3105 [2025-03-02 16:04:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:04:06 - End Time 2025-03-02 16:04:06 [2025-03-02 16:04:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:04:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592232', 'tblTempUsageDetail_20' ) start [2025-03-02 16:04:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592232', 'tblTempUsageDetail_20' ) end [2025-03-02 16:04:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592232', 'tblTempVendorCDR_20' ) start [2025-03-02 16:04:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592232', 'tblTempVendorCDR_20' ) end [2025-03-02 16:04:20] Production.INFO: ProcessCDR(1,14592232,1,1,2) [2025-03-02 16:04:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592232,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:04:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592232,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:04:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592232,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:04:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592232,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:04:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592232', 'tblTempUsageDetail_20' ) start [2025-03-02 16:04:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592232', 'tblTempUsageDetail_20' ) end [2025-03-02 16:04:25] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:04:25] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:04:25] Production.INFO: ==3117== Releasing lock... [2025-03-02 16:04:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:04:25] Production.INFO: 51.5 MB #Memory Used# [2025-03-02 16:05:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:05:05 [end_date_ymd] => 2025-03-02 16:05:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:05:05' and `end` < '2025-03-02 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-03-02 16:05:17] Production.INFO: count ==3103 [2025-03-02 16:05:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:05:05 - End Time 2025-03-02 16:05:05 [2025-03-02 16:05:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:05:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592237', 'tblTempUsageDetail_20' ) start [2025-03-02 16:05:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592237', 'tblTempUsageDetail_20' ) end [2025-03-02 16:05:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592237', 'tblTempVendorCDR_20' ) start [2025-03-02 16:05:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592237', 'tblTempVendorCDR_20' ) end [2025-03-02 16:05:19] Production.INFO: ProcessCDR(1,14592237,1,1,2) [2025-03-02 16:05:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592237,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:05:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592237,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:05:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592237,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:05:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592237,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:05:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592237', 'tblTempUsageDetail_20' ) start [2025-03-02 16:05:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592237', 'tblTempUsageDetail_20' ) end [2025-03-02 16:05:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:05:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:05:22] Production.INFO: ==3227== Releasing lock... [2025-03-02 16:05:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:05:22] Production.INFO: 51 MB #Memory Used# [2025-03-02 16:06:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:06:05 [end_date_ymd] => 2025-03-02 16:06:05 [RateCDR] => 1 ) [2025-03-02 16: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-03-02 13:06:05' and `end` < '2025-03-02 16: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-03-02 16:06:17] Production.INFO: count ==3099 [2025-03-02 16:06:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:06:05 - End Time 2025-03-02 16:06:05 [2025-03-02 16:06:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:06:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592242', 'tblTempUsageDetail_20' ) start [2025-03-02 16:06:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592242', 'tblTempUsageDetail_20' ) end [2025-03-02 16:06:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592242', 'tblTempVendorCDR_20' ) start [2025-03-02 16:06:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592242', 'tblTempVendorCDR_20' ) end [2025-03-02 16:06:19] Production.INFO: ProcessCDR(1,14592242,1,1,2) [2025-03-02 16:06:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592242,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:06:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592242,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:06:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592242,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:06:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592242,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:06:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592242', 'tblTempUsageDetail_20' ) start [2025-03-02 16:06:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592242', 'tblTempUsageDetail_20' ) end [2025-03-02 16:06:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:06:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:06:24] Production.INFO: ==3335== Releasing lock... [2025-03-02 16:06:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:06:24] Production.INFO: 51.25 MB #Memory Used# [2025-03-02 16:07:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:07:05 [end_date_ymd] => 2025-03-02 16:07:05 [RateCDR] => 1 ) [2025-03-02 16: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-03-02 13:07:05' and `end` < '2025-03-02 16: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-03-02 16:07:17] Production.INFO: count ==3099 [2025-03-02 16:07:18] Production.ERROR: pbx CDR StartTime 2025-03-02 13:07:05 - End Time 2025-03-02 16:07:05 [2025-03-02 16:07:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592247', 'tblTempUsageDetail_20' ) start [2025-03-02 16:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592247', 'tblTempUsageDetail_20' ) end [2025-03-02 16:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592247', 'tblTempVendorCDR_20' ) start [2025-03-02 16:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592247', 'tblTempVendorCDR_20' ) end [2025-03-02 16:07:18] Production.INFO: ProcessCDR(1,14592247,1,1,2) [2025-03-02 16:07:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592247,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:07:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592247,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:07:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592247,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:07:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592247,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:07:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592247', 'tblTempUsageDetail_20' ) start [2025-03-02 16:07:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592247', 'tblTempUsageDetail_20' ) end [2025-03-02 16:07:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:07:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:07:23] Production.INFO: ==3482== Releasing lock... [2025-03-02 16:07:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:07:23] Production.INFO: 51.75 MB #Memory Used# [2025-03-02 16:08:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:08:05 [end_date_ymd] => 2025-03-02 16:08:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:08:05' and `end` < '2025-03-02 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-03-02 16:08:18] Production.INFO: count ==3100 [2025-03-02 16:08:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:08:05 - End Time 2025-03-02 16:08:05 [2025-03-02 16:08:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:08:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592252', 'tblTempUsageDetail_20' ) start [2025-03-02 16:08:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592252', 'tblTempUsageDetail_20' ) end [2025-03-02 16:08:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592252', 'tblTempVendorCDR_20' ) start [2025-03-02 16:08:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592252', 'tblTempVendorCDR_20' ) end [2025-03-02 16:08:19] Production.INFO: ProcessCDR(1,14592252,1,1,2) [2025-03-02 16:08:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592252,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:08:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592252,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:08:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592252,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:08:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592252,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:08:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592252', 'tblTempUsageDetail_20' ) start [2025-03-02 16:08:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592252', 'tblTempUsageDetail_20' ) end [2025-03-02 16:08:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:08:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:08:24] Production.INFO: ==3602== Releasing lock... [2025-03-02 16:08:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:08:24] Production.INFO: 51.5 MB #Memory Used# [2025-03-02 16:09:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:09:05 [end_date_ymd] => 2025-03-02 16:09:05 [RateCDR] => 1 ) [2025-03-02 16: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-03-02 13:09:05' and `end` < '2025-03-02 16: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-03-02 16:09:17] Production.INFO: count ==3104 [2025-03-02 16:09:18] Production.ERROR: pbx CDR StartTime 2025-03-02 13:09:05 - End Time 2025-03-02 16:09:05 [2025-03-02 16:09:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:09:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592257', 'tblTempUsageDetail_20' ) start [2025-03-02 16:09:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592257', 'tblTempUsageDetail_20' ) end [2025-03-02 16:09:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592257', 'tblTempVendorCDR_20' ) start [2025-03-02 16:09:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592257', 'tblTempVendorCDR_20' ) end [2025-03-02 16:09:19] Production.INFO: ProcessCDR(1,14592257,1,1,2) [2025-03-02 16:09:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592257,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:09:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592257,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:09:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592257,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:09:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592257,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:09:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592257', 'tblTempUsageDetail_20' ) start [2025-03-02 16:09:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592257', 'tblTempUsageDetail_20' ) end [2025-03-02 16:09:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:09:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:09:24] Production.INFO: ==3707== Releasing lock... [2025-03-02 16:09:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:09:24] Production.INFO: 51.75 MB #Memory Used# [2025-03-02 16:10:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:10:06 [end_date_ymd] => 2025-03-02 16:10:06 [RateCDR] => 1 ) [2025-03-02 16: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-03-02 13:10:06' and `end` < '2025-03-02 16: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-03-02 16:10:18] Production.INFO: count ==3113 [2025-03-02 16:10:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:10:06 - End Time 2025-03-02 16:10:06 [2025-03-02 16:10:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:10:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592262', 'tblTempUsageDetail_20' ) start [2025-03-02 16:10:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592262', 'tblTempUsageDetail_20' ) end [2025-03-02 16:10:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592262', 'tblTempVendorCDR_20' ) start [2025-03-02 16:10:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592262', 'tblTempVendorCDR_20' ) end [2025-03-02 16:10:20] Production.INFO: ProcessCDR(1,14592262,1,1,2) [2025-03-02 16:10:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592262,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:10:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592262,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:10:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592262,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:10:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592262,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:10:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592262', 'tblTempUsageDetail_20' ) start [2025-03-02 16:10:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592262', 'tblTempUsageDetail_20' ) end [2025-03-02 16:10:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:10:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:10:23] Production.INFO: ==3819== Releasing lock... [2025-03-02 16:10:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:10:23] Production.INFO: 51.25 MB #Memory Used# [2025-03-02 16:11:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:11:05 [end_date_ymd] => 2025-03-02 16:11:05 [RateCDR] => 1 ) [2025-03-02 16: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-03-02 13:11:05' and `end` < '2025-03-02 16: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-03-02 16:11:18] Production.INFO: count ==3111 [2025-03-02 16:11:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:11:05 - End Time 2025-03-02 16:11:05 [2025-03-02 16:11:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:11:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592268', 'tblTempUsageDetail_20' ) start [2025-03-02 16:11:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592268', 'tblTempUsageDetail_20' ) end [2025-03-02 16:11:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592268', 'tblTempVendorCDR_20' ) start [2025-03-02 16:11:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592268', 'tblTempVendorCDR_20' ) end [2025-03-02 16:11:19] Production.INFO: ProcessCDR(1,14592268,1,1,2) [2025-03-02 16:11:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592268,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:11:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592268,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:11:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592268,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:11:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592268,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:11:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592268', 'tblTempUsageDetail_20' ) start [2025-03-02 16:11:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592268', 'tblTempUsageDetail_20' ) end [2025-03-02 16:11:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:11:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:11:22] Production.INFO: ==3932== Releasing lock... [2025-03-02 16:11:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:11:22] Production.INFO: 51.25 MB #Memory Used# [2025-03-02 16:12:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:12:06 [end_date_ymd] => 2025-03-02 16:12:06 [RateCDR] => 1 ) [2025-03-02 16: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-03-02 13:12:06' and `end` < '2025-03-02 16: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-03-02 16:12:18] Production.INFO: count ==3106 [2025-03-02 16:12:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:12:06 - End Time 2025-03-02 16:12:06 [2025-03-02 16:12:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:12:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592273', 'tblTempUsageDetail_20' ) start [2025-03-02 16:12:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592273', 'tblTempUsageDetail_20' ) end [2025-03-02 16:12:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592273', 'tblTempVendorCDR_20' ) start [2025-03-02 16:12:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592273', 'tblTempVendorCDR_20' ) end [2025-03-02 16:12:19] Production.INFO: ProcessCDR(1,14592273,1,1,2) [2025-03-02 16:12:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592273,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:12:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592273,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:12:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592273,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:12:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592273,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:12:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592273', 'tblTempUsageDetail_20' ) start [2025-03-02 16:12:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592273', 'tblTempUsageDetail_20' ) end [2025-03-02 16:12:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:12:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:12:24] Production.INFO: ==4051== Releasing lock... [2025-03-02 16:12:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:12:24] Production.INFO: 51.5 MB #Memory Used# [2025-03-02 16:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:13:05 [end_date_ymd] => 2025-03-02 16:13:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:13:05' and `end` < '2025-03-02 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-03-02 16:13:17] Production.INFO: count ==3103 [2025-03-02 16:13:18] Production.ERROR: pbx CDR StartTime 2025-03-02 13:13:05 - End Time 2025-03-02 16:13:05 [2025-03-02 16:13:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592278', 'tblTempUsageDetail_20' ) start [2025-03-02 16:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592278', 'tblTempUsageDetail_20' ) end [2025-03-02 16:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592278', 'tblTempVendorCDR_20' ) start [2025-03-02 16:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592278', 'tblTempVendorCDR_20' ) end [2025-03-02 16:13:18] Production.INFO: ProcessCDR(1,14592278,1,1,2) [2025-03-02 16:13:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592278,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:13:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592278,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:13:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592278,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:13:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592278,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:13:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592278', 'tblTempUsageDetail_20' ) start [2025-03-02 16:13:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592278', 'tblTempUsageDetail_20' ) end [2025-03-02 16:13:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:13:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:13:22] Production.INFO: ==4169== Releasing lock... [2025-03-02 16:13:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:13:22] Production.INFO: 51.5 MB #Memory Used# [2025-03-02 16:14:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:14:05 [end_date_ymd] => 2025-03-02 16:14:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:14:05' and `end` < '2025-03-02 16: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-03-02 16:14:18] Production.INFO: count ==3082 [2025-03-02 16:14:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:14:05 - End Time 2025-03-02 16:14:05 [2025-03-02 16:14:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:14:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592283', 'tblTempUsageDetail_20' ) start [2025-03-02 16:14:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592283', 'tblTempUsageDetail_20' ) end [2025-03-02 16:14:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592283', 'tblTempVendorCDR_20' ) start [2025-03-02 16:14:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592283', 'tblTempVendorCDR_20' ) end [2025-03-02 16:14:19] Production.INFO: ProcessCDR(1,14592283,1,1,2) [2025-03-02 16:14:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592283,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:14:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592283,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:14:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592283,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:14:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592283,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:14:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592283', 'tblTempUsageDetail_20' ) start [2025-03-02 16:14:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592283', 'tblTempUsageDetail_20' ) end [2025-03-02 16:14:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:14:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:14:22] Production.INFO: ==4283== Releasing lock... [2025-03-02 16:14:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:14:22] Production.INFO: 51 MB #Memory Used# [2025-03-02 16:15:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:15:05 [end_date_ymd] => 2025-03-02 16:15:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:15:05' and `end` < '2025-03-02 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-03-02 16:15:17] Production.INFO: count ==3074 [2025-03-02 16:15:18] Production.ERROR: pbx CDR StartTime 2025-03-02 13:15:05 - End Time 2025-03-02 16:15:05 [2025-03-02 16:15:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592288', 'tblTempUsageDetail_20' ) start [2025-03-02 16:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592288', 'tblTempUsageDetail_20' ) end [2025-03-02 16:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592288', 'tblTempVendorCDR_20' ) start [2025-03-02 16:15:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592288', 'tblTempVendorCDR_20' ) end [2025-03-02 16:15:18] Production.INFO: ProcessCDR(1,14592288,1,1,2) [2025-03-02 16:15:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592288,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:15:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592288,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:15:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592288,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:15:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592288,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:15:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592288', 'tblTempUsageDetail_20' ) start [2025-03-02 16:15:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592288', 'tblTempUsageDetail_20' ) end [2025-03-02 16:15:21] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:15:21] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:15:21] Production.INFO: ==4392== Releasing lock... [2025-03-02 16:15:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:15:21] Production.INFO: 51.25 MB #Memory Used# [2025-03-02 16:16:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:16:05 [end_date_ymd] => 2025-03-02 16:16:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:16:05' and `end` < '2025-03-02 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-03-02 16:16:17] Production.INFO: count ==3070 [2025-03-02 16:16:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:16:05 - End Time 2025-03-02 16:16:05 [2025-03-02 16:16:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:16:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592293', 'tblTempUsageDetail_20' ) start [2025-03-02 16:16:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592293', 'tblTempUsageDetail_20' ) end [2025-03-02 16:16:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592293', 'tblTempVendorCDR_20' ) start [2025-03-02 16:16:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592293', 'tblTempVendorCDR_20' ) end [2025-03-02 16:16:19] Production.INFO: ProcessCDR(1,14592293,1,1,2) [2025-03-02 16:16:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592293,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:16:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592293,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:16:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592293,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:16:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592293,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:16:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592293', 'tblTempUsageDetail_20' ) start [2025-03-02 16:16:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592293', 'tblTempUsageDetail_20' ) end [2025-03-02 16:16:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:16:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:16:22] Production.INFO: ==4510== Releasing lock... [2025-03-02 16:16:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:16:22] Production.INFO: 50.75 MB #Memory Used# [2025-03-02 16:17:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:17:05 [end_date_ymd] => 2025-03-02 16:17:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:17:05' and `end` < '2025-03-02 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-03-02 16:17:17] Production.INFO: count ==3070 [2025-03-02 16:17:18] Production.ERROR: pbx CDR StartTime 2025-03-02 13:17:05 - End Time 2025-03-02 16:17:05 [2025-03-02 16:17:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592298', 'tblTempUsageDetail_20' ) start [2025-03-02 16:17:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592298', 'tblTempUsageDetail_20' ) end [2025-03-02 16:17:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592298', 'tblTempVendorCDR_20' ) start [2025-03-02 16:17:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592298', 'tblTempVendorCDR_20' ) end [2025-03-02 16:17:19] Production.INFO: ProcessCDR(1,14592298,1,1,2) [2025-03-02 16:17:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592298,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:17:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592298,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:17:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592298,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:17:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592298,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:17:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592298', 'tblTempUsageDetail_20' ) start [2025-03-02 16:17:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592298', 'tblTempUsageDetail_20' ) end [2025-03-02 16:17:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:17:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:17:23] Production.INFO: ==4639== Releasing lock... [2025-03-02 16:17:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:17:23] Production.INFO: 50.75 MB #Memory Used# [2025-03-02 16:18:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:18:05 [end_date_ymd] => 2025-03-02 16:18:05 [RateCDR] => 1 ) [2025-03-02 16: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-03-02 13:18:05' and `end` < '2025-03-02 16: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-03-02 16:18:17] Production.INFO: count ==3072 [2025-03-02 16:18:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:18:05 - End Time 2025-03-02 16:18:05 [2025-03-02 16:18:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:18:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592303', 'tblTempUsageDetail_20' ) start [2025-03-02 16:18:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592303', 'tblTempUsageDetail_20' ) end [2025-03-02 16:18:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592303', 'tblTempVendorCDR_20' ) start [2025-03-02 16:18:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592303', 'tblTempVendorCDR_20' ) end [2025-03-02 16:18:19] Production.INFO: ProcessCDR(1,14592303,1,1,2) [2025-03-02 16:18:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592303,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:18:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592303,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:18:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592303,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:18:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592303,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:18:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592303', 'tblTempUsageDetail_20' ) start [2025-03-02 16:18:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592303', 'tblTempUsageDetail_20' ) end [2025-03-02 16:18:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:18:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:18:23] Production.INFO: ==4764== Releasing lock... [2025-03-02 16:18:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:18:23] Production.INFO: 50.75 MB #Memory Used# [2025-03-02 16:19:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:19:05 [end_date_ymd] => 2025-03-02 16:19:05 [RateCDR] => 1 ) [2025-03-02 16: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-03-02 13:19:05' and `end` < '2025-03-02 16: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-03-02 16:19:17] Production.INFO: count ==3072 [2025-03-02 16:19:18] Production.ERROR: pbx CDR StartTime 2025-03-02 13:19:05 - End Time 2025-03-02 16:19:05 [2025-03-02 16:19:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592308', 'tblTempUsageDetail_20' ) start [2025-03-02 16:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592308', 'tblTempUsageDetail_20' ) end [2025-03-02 16:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592308', 'tblTempVendorCDR_20' ) start [2025-03-02 16:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592308', 'tblTempVendorCDR_20' ) end [2025-03-02 16:19:18] Production.INFO: ProcessCDR(1,14592308,1,1,2) [2025-03-02 16:19:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592308,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:19:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592308,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:19:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592308,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:19:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592308,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:19:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592308', 'tblTempUsageDetail_20' ) start [2025-03-02 16:19:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592308', 'tblTempUsageDetail_20' ) end [2025-03-02 16:19:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:19:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:19:22] Production.INFO: ==4885== Releasing lock... [2025-03-02 16:19:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:19:22] Production.INFO: 50.75 MB #Memory Used# [2025-03-02 16:20:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:20:06 [end_date_ymd] => 2025-03-02 16:20:06 [RateCDR] => 1 ) [2025-03-02 16: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-03-02 13:20:06' and `end` < '2025-03-02 16: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-03-02 16:20:18] Production.INFO: count ==3075 [2025-03-02 16:20:20] Production.ERROR: pbx CDR StartTime 2025-03-02 13:20:06 - End Time 2025-03-02 16:20:06 [2025-03-02 16:20:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:20:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592314', 'tblTempUsageDetail_20' ) start [2025-03-02 16:20:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592314', 'tblTempUsageDetail_20' ) end [2025-03-02 16:20:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592314', 'tblTempVendorCDR_20' ) start [2025-03-02 16:20:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592314', 'tblTempVendorCDR_20' ) end [2025-03-02 16:20:20] Production.INFO: ProcessCDR(1,14592314,1,1,2) [2025-03-02 16:20:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592314,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:20:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592314,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:20:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592314,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:20:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592314,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:20:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592314', 'tblTempUsageDetail_20' ) start [2025-03-02 16:20:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592314', 'tblTempUsageDetail_20' ) end [2025-03-02 16:20:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:20:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:20:24] Production.INFO: ==4996== Releasing lock... [2025-03-02 16:20:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:20:24] Production.INFO: 50.75 MB #Memory Used# [2025-03-02 16:21:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:21:05 [end_date_ymd] => 2025-03-02 16:21:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:21:05' and `end` < '2025-03-02 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-03-02 16:21:18] Production.INFO: count ==3124 [2025-03-02 16:21:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:21:05 - End Time 2025-03-02 16:21:05 [2025-03-02 16:21:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:21:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592319', 'tblTempUsageDetail_20' ) start [2025-03-02 16:21:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592319', 'tblTempUsageDetail_20' ) end [2025-03-02 16:21:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592319', 'tblTempVendorCDR_20' ) start [2025-03-02 16:21:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592319', 'tblTempVendorCDR_20' ) end [2025-03-02 16:21:19] Production.INFO: ProcessCDR(1,14592319,1,1,2) [2025-03-02 16:21:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592319,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:21:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592319,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:21:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592319,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:21:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592319,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:21:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592319', 'tblTempUsageDetail_20' ) start [2025-03-02 16:21:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592319', 'tblTempUsageDetail_20' ) end [2025-03-02 16:21:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:21:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:21:24] Production.INFO: ==5126== Releasing lock... [2025-03-02 16:21:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:21:24] Production.INFO: 51.25 MB #Memory Used# [2025-03-02 16:22:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:22:05 [end_date_ymd] => 2025-03-02 16:22:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:22:05' and `end` < '2025-03-02 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-03-02 16:22:17] Production.INFO: count ==3126 [2025-03-02 16:22:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:22:05 - End Time 2025-03-02 16:22:05 [2025-03-02 16:22:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:22:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592324', 'tblTempUsageDetail_20' ) start [2025-03-02 16:22:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592324', 'tblTempUsageDetail_20' ) end [2025-03-02 16:22:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592324', 'tblTempVendorCDR_20' ) start [2025-03-02 16:22:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592324', 'tblTempVendorCDR_20' ) end [2025-03-02 16:22:19] Production.INFO: ProcessCDR(1,14592324,1,1,2) [2025-03-02 16:22:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592324,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:22:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592324,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:22:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592324,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:22:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592324,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:22:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592324', 'tblTempUsageDetail_20' ) start [2025-03-02 16:22:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592324', 'tblTempUsageDetail_20' ) end [2025-03-02 16:22:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:22:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:22:22] Production.INFO: ==5291== Releasing lock... [2025-03-02 16:22:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:22:22] Production.INFO: 51.25 MB #Memory Used# [2025-03-02 16:23:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:23:06 [end_date_ymd] => 2025-03-02 16:23:06 [RateCDR] => 1 ) [2025-03-02 16: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-03-02 13:23:06' and `end` < '2025-03-02 16: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-03-02 16:23:18] Production.INFO: count ==3128 [2025-03-02 16:23:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:23:06 - End Time 2025-03-02 16:23:06 [2025-03-02 16:23:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:23:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592329', 'tblTempUsageDetail_20' ) start [2025-03-02 16:23:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592329', 'tblTempUsageDetail_20' ) end [2025-03-02 16:23:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592329', 'tblTempVendorCDR_20' ) start [2025-03-02 16:23:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592329', 'tblTempVendorCDR_20' ) end [2025-03-02 16:23:19] Production.INFO: ProcessCDR(1,14592329,1,1,2) [2025-03-02 16:23:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592329,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:23:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592329,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:23:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592329,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:23:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592329,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:23:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592329', 'tblTempUsageDetail_20' ) start [2025-03-02 16:23:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592329', 'tblTempUsageDetail_20' ) end [2025-03-02 16:23:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:23:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:23:24] Production.INFO: ==5400== Releasing lock... [2025-03-02 16:23:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:23:24] Production.INFO: 51.25 MB #Memory Used# [2025-03-02 16:24:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:24:05 [end_date_ymd] => 2025-03-02 16:24:05 [RateCDR] => 1 ) [2025-03-02 16: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-03-02 13:24:05' and `end` < '2025-03-02 16: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-03-02 16:24:17] Production.INFO: count ==3132 [2025-03-02 16:24:18] Production.ERROR: pbx CDR StartTime 2025-03-02 13:24:05 - End Time 2025-03-02 16:24:05 [2025-03-02 16:24:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592334', 'tblTempUsageDetail_20' ) start [2025-03-02 16:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592334', 'tblTempUsageDetail_20' ) end [2025-03-02 16:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592334', 'tblTempVendorCDR_20' ) start [2025-03-02 16:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592334', 'tblTempVendorCDR_20' ) end [2025-03-02 16:24:18] Production.INFO: ProcessCDR(1,14592334,1,1,2) [2025-03-02 16:24:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592334,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:24:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592334,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:24:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592334,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:24:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592334,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:24:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592334', 'tblTempUsageDetail_20' ) start [2025-03-02 16:24:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592334', 'tblTempUsageDetail_20' ) end [2025-03-02 16:24:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:24:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:24:22] Production.INFO: ==5522== Releasing lock... [2025-03-02 16:24:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:24:22] Production.INFO: 51.25 MB #Memory Used# [2025-03-02 16:25:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:25:05 [end_date_ymd] => 2025-03-02 16:25:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:25:05' and `end` < '2025-03-02 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-03-02 16:25:18] Production.INFO: count ==3133 [2025-03-02 16:25:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:25:05 - End Time 2025-03-02 16:25:05 [2025-03-02 16:25:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:25:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592339', 'tblTempUsageDetail_20' ) start [2025-03-02 16:25:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592339', 'tblTempUsageDetail_20' ) end [2025-03-02 16:25:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592339', 'tblTempVendorCDR_20' ) start [2025-03-02 16:25:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592339', 'tblTempVendorCDR_20' ) end [2025-03-02 16:25:19] Production.INFO: ProcessCDR(1,14592339,1,1,2) [2025-03-02 16:25:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592339,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:25:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592339,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:25:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592339,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:25:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592339,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:25:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592339', 'tblTempUsageDetail_20' ) start [2025-03-02 16:25:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592339', 'tblTempUsageDetail_20' ) end [2025-03-02 16:25:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:25:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:25:24] Production.INFO: ==5635== Releasing lock... [2025-03-02 16:25:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:25:24] Production.INFO: 52 MB #Memory Used# [2025-03-02 16:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:26:05 [end_date_ymd] => 2025-03-02 16:26:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:26:05' and `end` < '2025-03-02 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-03-02 16:26:17] Production.INFO: count ==3129 [2025-03-02 16:26:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:26:05 - End Time 2025-03-02 16:26:05 [2025-03-02 16:26:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:26:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592344', 'tblTempUsageDetail_20' ) start [2025-03-02 16:26:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592344', 'tblTempUsageDetail_20' ) end [2025-03-02 16:26:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592344', 'tblTempVendorCDR_20' ) start [2025-03-02 16:26:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592344', 'tblTempVendorCDR_20' ) end [2025-03-02 16:26:19] Production.INFO: ProcessCDR(1,14592344,1,1,2) [2025-03-02 16:26:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592344,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:26:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592344,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:26:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592344,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:26:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592344,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:26:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592344', 'tblTempUsageDetail_20' ) start [2025-03-02 16:26:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592344', 'tblTempUsageDetail_20' ) end [2025-03-02 16:26:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:26:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:26:22] Production.INFO: ==5755== Releasing lock... [2025-03-02 16:26:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:26:22] Production.INFO: 51.25 MB #Memory Used# [2025-03-02 16:27:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:27:06 [end_date_ymd] => 2025-03-02 16:27:06 [RateCDR] => 1 ) [2025-03-02 16: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-03-02 13:27:06' and `end` < '2025-03-02 16: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-03-02 16:27:18] Production.INFO: count ==3125 [2025-03-02 16:27:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:27:06 - End Time 2025-03-02 16:27:06 [2025-03-02 16:27:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:27:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592349', 'tblTempUsageDetail_20' ) start [2025-03-02 16:27:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592349', 'tblTempUsageDetail_20' ) end [2025-03-02 16:27:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592349', 'tblTempVendorCDR_20' ) start [2025-03-02 16:27:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592349', 'tblTempVendorCDR_20' ) end [2025-03-02 16:27:19] Production.INFO: ProcessCDR(1,14592349,1,1,2) [2025-03-02 16:27:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592349,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:27:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592349,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:27:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592349,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:27:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592349,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:27:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592349', 'tblTempUsageDetail_20' ) start [2025-03-02 16:27:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592349', 'tblTempUsageDetail_20' ) end [2025-03-02 16:27:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:27:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:27:22] Production.INFO: ==5886== Releasing lock... [2025-03-02 16:27:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:27:22] Production.INFO: 51.25 MB #Memory Used# [2025-03-02 16:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:28:05 [end_date_ymd] => 2025-03-02 16:28:05 [RateCDR] => 1 ) [2025-03-02 16: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-03-02 13:28:05' and `end` < '2025-03-02 16: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-03-02 16:28:17] Production.INFO: count ==3124 [2025-03-02 16:28:18] Production.ERROR: pbx CDR StartTime 2025-03-02 13:28:05 - End Time 2025-03-02 16:28:05 [2025-03-02 16:28:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592354', 'tblTempUsageDetail_20' ) start [2025-03-02 16:28:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592354', 'tblTempUsageDetail_20' ) end [2025-03-02 16:28:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592354', 'tblTempVendorCDR_20' ) start [2025-03-02 16:28:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592354', 'tblTempVendorCDR_20' ) end [2025-03-02 16:28:19] Production.INFO: ProcessCDR(1,14592354,1,1,2) [2025-03-02 16:28:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592354,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:28:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592354,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:28:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592354,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:28:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592354,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:28:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592354', 'tblTempUsageDetail_20' ) start [2025-03-02 16:28:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592354', 'tblTempUsageDetail_20' ) end [2025-03-02 16:28:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:28:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:28:22] Production.INFO: ==6005== Releasing lock... [2025-03-02 16:28:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:28:22] Production.INFO: 51.25 MB #Memory Used# [2025-03-02 16:29:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:29:05 [end_date_ymd] => 2025-03-02 16:29:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:29:05' and `end` < '2025-03-02 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-03-02 16:29:17] Production.INFO: count ==3122 [2025-03-02 16:29:18] Production.ERROR: pbx CDR StartTime 2025-03-02 13:29:05 - End Time 2025-03-02 16:29:05 [2025-03-02 16:29:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:29:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592359', 'tblTempUsageDetail_20' ) start [2025-03-02 16:29:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592359', 'tblTempUsageDetail_20' ) end [2025-03-02 16:29:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592359', 'tblTempVendorCDR_20' ) start [2025-03-02 16:29:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592359', 'tblTempVendorCDR_20' ) end [2025-03-02 16:29:19] Production.INFO: ProcessCDR(1,14592359,1,1,2) [2025-03-02 16:29:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592359,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:29:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592359,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:29:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592359,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:29:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592359,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:29:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592359', 'tblTempUsageDetail_20' ) start [2025-03-02 16:29:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592359', 'tblTempUsageDetail_20' ) end [2025-03-02 16:29:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:29:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:29:22] Production.INFO: ==6115== Releasing lock... [2025-03-02 16:29:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:29:22] Production.INFO: 51.75 MB #Memory Used# [2025-03-02 16:30:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:30:06 [end_date_ymd] => 2025-03-02 16:30:06 [RateCDR] => 1 ) [2025-03-02 16: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-03-02 13:30:06' and `end` < '2025-03-02 16: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-03-02 16:30:18] Production.INFO: count ==3117 [2025-03-02 16:30:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:30:06 - End Time 2025-03-02 16:30:06 [2025-03-02 16:30:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:30:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592365', 'tblTempUsageDetail_20' ) start [2025-03-02 16:30:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592365', 'tblTempUsageDetail_20' ) end [2025-03-02 16:30:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592365', 'tblTempVendorCDR_20' ) start [2025-03-02 16:30:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592365', 'tblTempVendorCDR_20' ) end [2025-03-02 16:30:19] Production.INFO: ProcessCDR(1,14592365,1,1,2) [2025-03-02 16:30:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592365,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:30:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592365,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:30:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592365,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:30:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592365,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:30:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592365', 'tblTempUsageDetail_20' ) start [2025-03-02 16:30:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592365', 'tblTempUsageDetail_20' ) end [2025-03-02 16:30:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:30:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:30:23] Production.INFO: ==6237== Releasing lock... [2025-03-02 16:30:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:30:23] Production.INFO: 51.25 MB #Memory Used# [2025-03-02 16:31:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:31:06 [end_date_ymd] => 2025-03-02 16:31:06 [RateCDR] => 1 ) [2025-03-02 16: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-03-02 13:31:06' and `end` < '2025-03-02 16: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-03-02 16:31:18] Production.INFO: count ==3119 [2025-03-02 16:31:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:31:06 - End Time 2025-03-02 16:31:06 [2025-03-02 16:31:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:31:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592370', 'tblTempUsageDetail_20' ) start [2025-03-02 16:31:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592370', 'tblTempUsageDetail_20' ) end [2025-03-02 16:31:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592370', 'tblTempVendorCDR_20' ) start [2025-03-02 16:31:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592370', 'tblTempVendorCDR_20' ) end [2025-03-02 16:31:19] Production.INFO: ProcessCDR(1,14592370,1,1,2) [2025-03-02 16:31:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592370,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:31:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592370,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:31:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592370,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:31:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592370,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:31:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592370', 'tblTempUsageDetail_20' ) start [2025-03-02 16:31:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592370', 'tblTempUsageDetail_20' ) end [2025-03-02 16:31:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:31:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:31:24] Production.INFO: ==6359== Releasing lock... [2025-03-02 16:31:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:31:24] Production.INFO: 51.25 MB #Memory Used# [2025-03-02 16:32:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:32:06 [end_date_ymd] => 2025-03-02 16:32:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:32:06' and `end` < '2025-03-02 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-03-02 16:32:18] Production.INFO: count ==3123 [2025-03-02 16:32:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:32:06 - End Time 2025-03-02 16:32:06 [2025-03-02 16:32:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:32:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592375', 'tblTempUsageDetail_20' ) start [2025-03-02 16:32:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592375', 'tblTempUsageDetail_20' ) end [2025-03-02 16:32:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592375', 'tblTempVendorCDR_20' ) start [2025-03-02 16:32:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592375', 'tblTempVendorCDR_20' ) end [2025-03-02 16:32:19] Production.INFO: ProcessCDR(1,14592375,1,1,2) [2025-03-02 16:32:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592375,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:32:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592375,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:32:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592375,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:32:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592375,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:32:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592375', 'tblTempUsageDetail_20' ) start [2025-03-02 16:32:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592375', 'tblTempUsageDetail_20' ) end [2025-03-02 16:32:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:32:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:32:23] Production.INFO: ==6487== Releasing lock... [2025-03-02 16:32:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:32:23] Production.INFO: 51.25 MB #Memory Used# [2025-03-02 16:33:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:33:05 [end_date_ymd] => 2025-03-02 16:33:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:33:05' and `end` < '2025-03-02 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-03-02 16:33:17] Production.INFO: count ==3126 [2025-03-02 16:33:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:33:05 - End Time 2025-03-02 16:33:05 [2025-03-02 16:33:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:33:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592380', 'tblTempUsageDetail_20' ) start [2025-03-02 16:33:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592380', 'tblTempUsageDetail_20' ) end [2025-03-02 16:33:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592380', 'tblTempVendorCDR_20' ) start [2025-03-02 16:33:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592380', 'tblTempVendorCDR_20' ) end [2025-03-02 16:33:19] Production.INFO: ProcessCDR(1,14592380,1,1,2) [2025-03-02 16:33:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592380,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:33:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592380,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:33:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592380,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:33:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592380,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:33:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592380', 'tblTempUsageDetail_20' ) start [2025-03-02 16:33:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592380', 'tblTempUsageDetail_20' ) end [2025-03-02 16:33:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:33:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:33:22] Production.INFO: ==6599== Releasing lock... [2025-03-02 16:33:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:33:22] Production.INFO: 51.25 MB #Memory Used# [2025-03-02 16:34:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:34:05 [end_date_ymd] => 2025-03-02 16:34:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:34:05' and `end` < '2025-03-02 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-03-02 16:34:18] Production.INFO: count ==3130 [2025-03-02 16:34:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:34:05 - End Time 2025-03-02 16:34:05 [2025-03-02 16:34:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:34:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592385', 'tblTempUsageDetail_20' ) start [2025-03-02 16:34:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592385', 'tblTempUsageDetail_20' ) end [2025-03-02 16:34:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592385', 'tblTempVendorCDR_20' ) start [2025-03-02 16:34:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592385', 'tblTempVendorCDR_20' ) end [2025-03-02 16:34:19] Production.INFO: ProcessCDR(1,14592385,1,1,2) [2025-03-02 16:34:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592385,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:34:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592385,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:34:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592385,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:34:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592385,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:34:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592385', 'tblTempUsageDetail_20' ) start [2025-03-02 16:34:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592385', 'tblTempUsageDetail_20' ) end [2025-03-02 16:34:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:34:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:34:24] Production.INFO: ==6715== Releasing lock... [2025-03-02 16:34:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:34:24] Production.INFO: 51.25 MB #Memory Used# [2025-03-02 16:35:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:35:05 [end_date_ymd] => 2025-03-02 16:35:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:35:05' and `end` < '2025-03-02 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-03-02 16:35:17] Production.INFO: count ==3130 [2025-03-02 16:35:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:35:05 - End Time 2025-03-02 16:35:05 [2025-03-02 16:35:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:35:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592390', 'tblTempUsageDetail_20' ) start [2025-03-02 16:35:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592390', 'tblTempUsageDetail_20' ) end [2025-03-02 16:35:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592390', 'tblTempVendorCDR_20' ) start [2025-03-02 16:35:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592390', 'tblTempVendorCDR_20' ) end [2025-03-02 16:35:19] Production.INFO: ProcessCDR(1,14592390,1,1,2) [2025-03-02 16:35:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592390,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:35:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592390,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:35:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592390,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:35:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592390,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:35:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592390', 'tblTempUsageDetail_20' ) start [2025-03-02 16:35:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592390', 'tblTempUsageDetail_20' ) end [2025-03-02 16:35:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:35:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:35:22] Production.INFO: ==6832== Releasing lock... [2025-03-02 16:35:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:35:22] Production.INFO: 51.25 MB #Memory Used# [2025-03-02 16:36:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:36:06 [end_date_ymd] => 2025-03-02 16:36:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:36:06' and `end` < '2025-03-02 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-03-02 16:36:19] Production.INFO: count ==3130 [2025-03-02 16:36:20] Production.ERROR: pbx CDR StartTime 2025-03-02 13:36:06 - End Time 2025-03-02 16:36:06 [2025-03-02 16:36:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:36:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592395', 'tblTempUsageDetail_20' ) start [2025-03-02 16:36:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592395', 'tblTempUsageDetail_20' ) end [2025-03-02 16:36:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592395', 'tblTempVendorCDR_20' ) start [2025-03-02 16:36:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592395', 'tblTempVendorCDR_20' ) end [2025-03-02 16:36:20] Production.INFO: ProcessCDR(1,14592395,1,1,2) [2025-03-02 16:36:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592395,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:36:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592395,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:36:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592395,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:36:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592395,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:36:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592395', 'tblTempUsageDetail_20' ) start [2025-03-02 16:36:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592395', 'tblTempUsageDetail_20' ) end [2025-03-02 16:36:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:36:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:36:23] Production.INFO: ==6961== Releasing lock... [2025-03-02 16:36:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:36:23] Production.INFO: 51.25 MB #Memory Used# [2025-03-02 16:37:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:37:05 [end_date_ymd] => 2025-03-02 16:37:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:37:05' and `end` < '2025-03-02 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-03-02 16:37:17] Production.INFO: count ==3139 [2025-03-02 16:37:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:37:05 - End Time 2025-03-02 16:37:05 [2025-03-02 16:37:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:37:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592400', 'tblTempUsageDetail_20' ) start [2025-03-02 16:37:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592400', 'tblTempUsageDetail_20' ) end [2025-03-02 16:37:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592400', 'tblTempVendorCDR_20' ) start [2025-03-02 16:37:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592400', 'tblTempVendorCDR_20' ) end [2025-03-02 16:37:19] Production.INFO: ProcessCDR(1,14592400,1,1,2) [2025-03-02 16:37:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592400,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:37:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592400,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:37:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592400,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:37:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592400,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:37:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592400', 'tblTempUsageDetail_20' ) start [2025-03-02 16:37:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592400', 'tblTempUsageDetail_20' ) end [2025-03-02 16:37:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:37:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:37:23] Production.INFO: ==7109== Releasing lock... [2025-03-02 16:37:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:37:23] Production.INFO: 51.25 MB #Memory Used# [2025-03-02 16:38:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:38:06 [end_date_ymd] => 2025-03-02 16:38:06 [RateCDR] => 1 ) [2025-03-02 16: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-03-02 13:38:06' and `end` < '2025-03-02 16: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-03-02 16:38:18] Production.INFO: count ==3139 [2025-03-02 16:38:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:38:06 - End Time 2025-03-02 16:38:06 [2025-03-02 16:38:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:38:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592405', 'tblTempUsageDetail_20' ) start [2025-03-02 16:38:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592405', 'tblTempUsageDetail_20' ) end [2025-03-02 16:38:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592405', 'tblTempVendorCDR_20' ) start [2025-03-02 16:38:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592405', 'tblTempVendorCDR_20' ) end [2025-03-02 16:38:19] Production.INFO: ProcessCDR(1,14592405,1,1,2) [2025-03-02 16:38:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592405,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:38:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592405,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:38:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592405,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:38:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592405,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:38:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592405', 'tblTempUsageDetail_20' ) start [2025-03-02 16:38:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592405', 'tblTempUsageDetail_20' ) end [2025-03-02 16:38:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:38:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:38:24] Production.INFO: ==7223== Releasing lock... [2025-03-02 16:38:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:38:24] Production.INFO: 51.25 MB #Memory Used# [2025-03-02 16:39:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:39:05 [end_date_ymd] => 2025-03-02 16:39:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:39:05' and `end` < '2025-03-02 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-03-02 16:39:18] Production.INFO: count ==3140 [2025-03-02 16:39:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:39:05 - End Time 2025-03-02 16:39:05 [2025-03-02 16:39:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:39:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592410', 'tblTempUsageDetail_20' ) start [2025-03-02 16:39:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592410', 'tblTempUsageDetail_20' ) end [2025-03-02 16:39:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592410', 'tblTempVendorCDR_20' ) start [2025-03-02 16:39:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592410', 'tblTempVendorCDR_20' ) end [2025-03-02 16:39:19] Production.INFO: ProcessCDR(1,14592410,1,1,2) [2025-03-02 16:39:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592410,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:39:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592410,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:39:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592410,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:39:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592410,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:39:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592410', 'tblTempUsageDetail_20' ) start [2025-03-02 16:39:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592410', 'tblTempUsageDetail_20' ) end [2025-03-02 16:39:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:39:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:39:24] Production.INFO: ==7335== Releasing lock... [2025-03-02 16:39:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:39:24] Production.INFO: 51.25 MB #Memory Used# [2025-03-02 16:40:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:40:06 [end_date_ymd] => 2025-03-02 16:40:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:40:06' and `end` < '2025-03-02 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-03-02 16:40:18] Production.INFO: count ==3150 [2025-03-02 16:40:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:40:06 - End Time 2025-03-02 16:40:06 [2025-03-02 16:40:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592416', 'tblTempUsageDetail_20' ) start [2025-03-02 16:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592416', 'tblTempUsageDetail_20' ) end [2025-03-02 16:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592416', 'tblTempVendorCDR_20' ) start [2025-03-02 16:40:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592416', 'tblTempVendorCDR_20' ) end [2025-03-02 16:40:19] Production.INFO: ProcessCDR(1,14592416,1,1,2) [2025-03-02 16:40:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592416,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:40:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592416,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:40:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592416,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:40:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592416,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:40:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592416', 'tblTempUsageDetail_20' ) start [2025-03-02 16:40:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592416', 'tblTempUsageDetail_20' ) end [2025-03-02 16:40:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:40:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:40:24] Production.INFO: ==7448== Releasing lock... [2025-03-02 16:40:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:40:24] Production.INFO: 51.5 MB #Memory Used# [2025-03-02 16:41:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:41:05 [end_date_ymd] => 2025-03-02 16:41:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:41:05' and `end` < '2025-03-02 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-03-02 16:41:17] Production.INFO: count ==3184 [2025-03-02 16:41:18] Production.ERROR: pbx CDR StartTime 2025-03-02 13:41:05 - End Time 2025-03-02 16:41:05 [2025-03-02 16:41:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:41:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592421', 'tblTempUsageDetail_20' ) start [2025-03-02 16:41:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592421', 'tblTempUsageDetail_20' ) end [2025-03-02 16:41:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592421', 'tblTempVendorCDR_20' ) start [2025-03-02 16:41:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592421', 'tblTempVendorCDR_20' ) end [2025-03-02 16:41:19] Production.INFO: ProcessCDR(1,14592421,1,1,2) [2025-03-02 16:41:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592421,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:41:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592421,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:41:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592421,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:41:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592421,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:41:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592421', 'tblTempUsageDetail_20' ) start [2025-03-02 16:41:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592421', 'tblTempUsageDetail_20' ) end [2025-03-02 16:41:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:41:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:41:24] Production.INFO: ==7570== Releasing lock... [2025-03-02 16:41:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:41:24] Production.INFO: 51.75 MB #Memory Used# [2025-03-02 16:42:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:42:05 [end_date_ymd] => 2025-03-02 16:42:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:42:05' and `end` < '2025-03-02 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-03-02 16:42:18] Production.INFO: count ==3181 [2025-03-02 16:42:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:42:05 - End Time 2025-03-02 16:42:05 [2025-03-02 16:42:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:42:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592426', 'tblTempUsageDetail_20' ) start [2025-03-02 16:42:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592426', 'tblTempUsageDetail_20' ) end [2025-03-02 16:42:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592426', 'tblTempVendorCDR_20' ) start [2025-03-02 16:42:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592426', 'tblTempVendorCDR_20' ) end [2025-03-02 16:42:19] Production.INFO: ProcessCDR(1,14592426,1,1,2) [2025-03-02 16:42:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592426,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:42:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592426,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:42:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592426,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:42:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592426,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:42:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592426', 'tblTempUsageDetail_20' ) start [2025-03-02 16:42:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592426', 'tblTempUsageDetail_20' ) end [2025-03-02 16:42:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:42:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:42:24] Production.INFO: ==7693== Releasing lock... [2025-03-02 16:42:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:42:24] Production.INFO: 52 MB #Memory Used# [2025-03-02 16:43:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:43:05 [end_date_ymd] => 2025-03-02 16:43:05 [RateCDR] => 1 ) [2025-03-02 16: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-03-02 13:43:05' and `end` < '2025-03-02 16: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-03-02 16:43:18] Production.INFO: count ==3184 [2025-03-02 16:43:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:43:05 - End Time 2025-03-02 16:43:05 [2025-03-02 16:43:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:43:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592431', 'tblTempUsageDetail_20' ) start [2025-03-02 16:43:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592431', 'tblTempUsageDetail_20' ) end [2025-03-02 16:43:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592431', 'tblTempVendorCDR_20' ) start [2025-03-02 16:43:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592431', 'tblTempVendorCDR_20' ) end [2025-03-02 16:43:19] Production.INFO: ProcessCDR(1,14592431,1,1,2) [2025-03-02 16:43:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592431,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:43:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592431,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:43:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592431,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:43:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592431,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:43:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592431', 'tblTempUsageDetail_20' ) start [2025-03-02 16:43:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592431', 'tblTempUsageDetail_20' ) end [2025-03-02 16:43:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:43:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:43:22] Production.INFO: ==7804== Releasing lock... [2025-03-02 16:43:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:43:22] Production.INFO: 51.75 MB #Memory Used# [2025-03-02 16:44:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:44:06 [end_date_ymd] => 2025-03-02 16:44:06 [RateCDR] => 1 ) [2025-03-02 16: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-03-02 13:44:06' and `end` < '2025-03-02 16: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-03-02 16:44:18] Production.INFO: count ==3187 [2025-03-02 16:44:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:44:06 - End Time 2025-03-02 16:44:06 [2025-03-02 16:44:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:44:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592436', 'tblTempUsageDetail_20' ) start [2025-03-02 16:44:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592436', 'tblTempUsageDetail_20' ) end [2025-03-02 16:44:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592436', 'tblTempVendorCDR_20' ) start [2025-03-02 16:44:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592436', 'tblTempVendorCDR_20' ) end [2025-03-02 16:44:19] Production.INFO: ProcessCDR(1,14592436,1,1,2) [2025-03-02 16:44:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592436,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:44:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592436,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:44:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592436,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:44:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592436,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:44:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592436', 'tblTempUsageDetail_20' ) start [2025-03-02 16:44:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592436', 'tblTempUsageDetail_20' ) end [2025-03-02 16:44:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:44:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:44:23] Production.INFO: ==7911== Releasing lock... [2025-03-02 16:44:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:44:23] Production.INFO: 51.75 MB #Memory Used# [2025-03-02 16:45:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:45:05 [end_date_ymd] => 2025-03-02 16:45:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:45:05' and `end` < '2025-03-02 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-03-02 16:45:17] Production.INFO: count ==3190 [2025-03-02 16:45:18] Production.ERROR: pbx CDR StartTime 2025-03-02 13:45:05 - End Time 2025-03-02 16:45:05 [2025-03-02 16:45:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:45:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592441', 'tblTempUsageDetail_20' ) start [2025-03-02 16:45:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592441', 'tblTempUsageDetail_20' ) end [2025-03-02 16:45:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592441', 'tblTempVendorCDR_20' ) start [2025-03-02 16:45:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592441', 'tblTempVendorCDR_20' ) end [2025-03-02 16:45:19] Production.INFO: ProcessCDR(1,14592441,1,1,2) [2025-03-02 16:45:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592441,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:45:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592441,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:45:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592441,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:45:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592441,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:45:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592441', 'tblTempUsageDetail_20' ) start [2025-03-02 16:45:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592441', 'tblTempUsageDetail_20' ) end [2025-03-02 16:45:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:45:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:45:23] Production.INFO: ==8020== Releasing lock... [2025-03-02 16:45:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:45:23] Production.INFO: 51.75 MB #Memory Used# [2025-03-02 16:46:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:46:06 [end_date_ymd] => 2025-03-02 16:46:06 [RateCDR] => 1 ) [2025-03-02 16: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-03-02 13:46:06' and `end` < '2025-03-02 16: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-03-02 16:46:18] Production.INFO: count ==3191 [2025-03-02 16:46:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:46:06 - End Time 2025-03-02 16:46:06 [2025-03-02 16:46:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:46:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592446', 'tblTempUsageDetail_20' ) start [2025-03-02 16:46:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592446', 'tblTempUsageDetail_20' ) end [2025-03-02 16:46:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592446', 'tblTempVendorCDR_20' ) start [2025-03-02 16:46:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592446', 'tblTempVendorCDR_20' ) end [2025-03-02 16:46:19] Production.INFO: ProcessCDR(1,14592446,1,1,2) [2025-03-02 16:46:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592446,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:46:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592446,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:46:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592446,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:46:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592446,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:46:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592446', 'tblTempUsageDetail_20' ) start [2025-03-02 16:46:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592446', 'tblTempUsageDetail_20' ) end [2025-03-02 16:46:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:46:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:46:24] Production.INFO: ==8133== Releasing lock... [2025-03-02 16:46:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:46:24] Production.INFO: 51.75 MB #Memory Used# [2025-03-02 16:47:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:47:04 [end_date_ymd] => 2025-03-02 16:47:04 [RateCDR] => 1 ) [2025-03-02 16: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-03-02 13:47:04' and `end` < '2025-03-02 16: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-03-02 16:47:17] Production.INFO: count ==3192 [2025-03-02 16:47:18] Production.ERROR: pbx CDR StartTime 2025-03-02 13:47:04 - End Time 2025-03-02 16:47:04 [2025-03-02 16:47:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592451', 'tblTempUsageDetail_20' ) start [2025-03-02 16:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592451', 'tblTempUsageDetail_20' ) end [2025-03-02 16:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592451', 'tblTempVendorCDR_20' ) start [2025-03-02 16:47:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592451', 'tblTempVendorCDR_20' ) end [2025-03-02 16:47:18] Production.INFO: ProcessCDR(1,14592451,1,1,2) [2025-03-02 16:47:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592451,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:47:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592451,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:47:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592451,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:47:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592451,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:47:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592451', 'tblTempUsageDetail_20' ) start [2025-03-02 16:47:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592451', 'tblTempUsageDetail_20' ) end [2025-03-02 16:47:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:47:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:47:22] Production.INFO: ==8250== Releasing lock... [2025-03-02 16:47:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:47:22] Production.INFO: 51.75 MB #Memory Used# [2025-03-02 16:48:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:48:05 [end_date_ymd] => 2025-03-02 16:48:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:48:05' and `end` < '2025-03-02 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-03-02 16:48:17] Production.INFO: count ==3203 [2025-03-02 16:48:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:48:05 - End Time 2025-03-02 16:48:05 [2025-03-02 16:48:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:48:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592456', 'tblTempUsageDetail_20' ) start [2025-03-02 16:48:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592456', 'tblTempUsageDetail_20' ) end [2025-03-02 16:48:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592456', 'tblTempVendorCDR_20' ) start [2025-03-02 16:48:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592456', 'tblTempVendorCDR_20' ) end [2025-03-02 16:48:19] Production.INFO: ProcessCDR(1,14592456,1,1,2) [2025-03-02 16:48:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592456,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:48:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592456,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:48:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592456,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:48:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592456,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:48:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592456', 'tblTempUsageDetail_20' ) start [2025-03-02 16:48:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592456', 'tblTempUsageDetail_20' ) end [2025-03-02 16:48:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:48:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:48:22] Production.INFO: ==8360== Releasing lock... [2025-03-02 16:48:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:48:22] Production.INFO: 51.75 MB #Memory Used# [2025-03-02 16:49:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:49:06 [end_date_ymd] => 2025-03-02 16:49:06 [RateCDR] => 1 ) [2025-03-02 16: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-03-02 13:49:06' and `end` < '2025-03-02 16: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-03-02 16:49:18] Production.INFO: count ==3202 [2025-03-02 16:49:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:49:06 - End Time 2025-03-02 16:49:06 [2025-03-02 16:49:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:49:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592461', 'tblTempUsageDetail_20' ) start [2025-03-02 16:49:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592461', 'tblTempUsageDetail_20' ) end [2025-03-02 16:49:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592461', 'tblTempVendorCDR_20' ) start [2025-03-02 16:49:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592461', 'tblTempVendorCDR_20' ) end [2025-03-02 16:49:19] Production.INFO: ProcessCDR(1,14592461,1,1,2) [2025-03-02 16:49:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592461,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:49:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592461,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:49:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592461,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:49:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592461,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:49:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592461', 'tblTempUsageDetail_20' ) start [2025-03-02 16:49:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592461', 'tblTempUsageDetail_20' ) end [2025-03-02 16:49:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:49:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:49:23] Production.INFO: ==8486== Releasing lock... [2025-03-02 16:49:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:49:23] Production.INFO: 51.75 MB #Memory Used# [2025-03-02 16:50:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:50:06 [end_date_ymd] => 2025-03-02 16:50:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:50:06' and `end` < '2025-03-02 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-03-02 16:50:18] Production.INFO: count ==3200 [2025-03-02 16:50:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:50:06 - End Time 2025-03-02 16:50:06 [2025-03-02 16:50:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592466', 'tblTempUsageDetail_20' ) start [2025-03-02 16:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592466', 'tblTempUsageDetail_20' ) end [2025-03-02 16:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592466', 'tblTempVendorCDR_20' ) start [2025-03-02 16:50:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592466', 'tblTempVendorCDR_20' ) end [2025-03-02 16:50:19] Production.INFO: ProcessCDR(1,14592466,1,1,2) [2025-03-02 16:50:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592466,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:50:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592466,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:50:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592466,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:50:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592466,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:50:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592466', 'tblTempUsageDetail_20' ) start [2025-03-02 16:50:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592466', 'tblTempUsageDetail_20' ) end [2025-03-02 16:50:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:50:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:50:23] Production.INFO: ==8605== Releasing lock... [2025-03-02 16:50:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:50:23] Production.INFO: 51.75 MB #Memory Used# [2025-03-02 16:51:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:51:05 [end_date_ymd] => 2025-03-02 16:51:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:51:05' and `end` < '2025-03-02 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-03-02 16:51:18] Production.INFO: count ==3204 [2025-03-02 16:51:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:51:05 - End Time 2025-03-02 16:51:05 [2025-03-02 16:51:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:51:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592472', 'tblTempUsageDetail_20' ) start [2025-03-02 16:51:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592472', 'tblTempUsageDetail_20' ) end [2025-03-02 16:51:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592472', 'tblTempVendorCDR_20' ) start [2025-03-02 16:51:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592472', 'tblTempVendorCDR_20' ) end [2025-03-02 16:51:19] Production.INFO: ProcessCDR(1,14592472,1,1,2) [2025-03-02 16:51:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592472,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:51:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592472,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:51:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592472,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:51:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592472,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:51:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592472', 'tblTempUsageDetail_20' ) start [2025-03-02 16:51:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592472', 'tblTempUsageDetail_20' ) end [2025-03-02 16:51:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:51:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:51:22] Production.INFO: ==8716== Releasing lock... [2025-03-02 16:51:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:51:22] Production.INFO: 51.75 MB #Memory Used# [2025-03-02 16:52:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:52:05 [end_date_ymd] => 2025-03-02 16:52:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:52:05' and `end` < '2025-03-02 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-03-02 16:52:18] Production.INFO: count ==3206 [2025-03-02 16:52:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:52:05 - End Time 2025-03-02 16:52:05 [2025-03-02 16:52:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:52:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592477', 'tblTempUsageDetail_20' ) start [2025-03-02 16:52:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592477', 'tblTempUsageDetail_20' ) end [2025-03-02 16:52:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592477', 'tblTempVendorCDR_20' ) start [2025-03-02 16:52:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592477', 'tblTempVendorCDR_20' ) end [2025-03-02 16:52:19] Production.INFO: ProcessCDR(1,14592477,1,1,2) [2025-03-02 16:52:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592477,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:52:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592477,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:52:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592477,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:52:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592477,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:52:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592477', 'tblTempUsageDetail_20' ) start [2025-03-02 16:52:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592477', 'tblTempUsageDetail_20' ) end [2025-03-02 16:52:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:52:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:52:24] Production.INFO: ==8843== Releasing lock... [2025-03-02 16:52:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:52:24] Production.INFO: 51.75 MB #Memory Used# [2025-03-02 16:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:53:05 [end_date_ymd] => 2025-03-02 16:53:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:53:05' and `end` < '2025-03-02 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-03-02 16:53:18] Production.INFO: count ==3207 [2025-03-02 16:53:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:53:05 - End Time 2025-03-02 16:53:05 [2025-03-02 16:53:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:53:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592482', 'tblTempUsageDetail_20' ) start [2025-03-02 16:53:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592482', 'tblTempUsageDetail_20' ) end [2025-03-02 16:53:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592482', 'tblTempVendorCDR_20' ) start [2025-03-02 16:53:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592482', 'tblTempVendorCDR_20' ) end [2025-03-02 16:53:19] Production.INFO: ProcessCDR(1,14592482,1,1,2) [2025-03-02 16:53:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592482,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:53:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592482,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:53:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592482,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:53:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592482,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:53:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592482', 'tblTempUsageDetail_20' ) start [2025-03-02 16:53:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592482', 'tblTempUsageDetail_20' ) end [2025-03-02 16:53:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:53:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:53:22] Production.INFO: ==9001== Releasing lock... [2025-03-02 16:53:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:53:22] Production.INFO: 51.75 MB #Memory Used# [2025-03-02 16:54:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:54:05 [end_date_ymd] => 2025-03-02 16:54:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:54:05' and `end` < '2025-03-02 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-03-02 16:54:18] Production.INFO: count ==3206 [2025-03-02 16:54:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:54:05 - End Time 2025-03-02 16:54:05 [2025-03-02 16:54:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:54:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592487', 'tblTempUsageDetail_20' ) start [2025-03-02 16:54:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592487', 'tblTempUsageDetail_20' ) end [2025-03-02 16:54:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592487', 'tblTempVendorCDR_20' ) start [2025-03-02 16:54:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592487', 'tblTempVendorCDR_20' ) end [2025-03-02 16:54:19] Production.INFO: ProcessCDR(1,14592487,1,1,2) [2025-03-02 16:54:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592487,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:54:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592487,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:54:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592487,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:54:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592487,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:54:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592487', 'tblTempUsageDetail_20' ) start [2025-03-02 16:54:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592487', 'tblTempUsageDetail_20' ) end [2025-03-02 16:54:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:54:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:54:24] Production.INFO: ==9126== Releasing lock... [2025-03-02 16:54:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:54:24] Production.INFO: 51.75 MB #Memory Used# [2025-03-02 16:55:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:55:06 [end_date_ymd] => 2025-03-02 16:55:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:55:06' and `end` < '2025-03-02 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-03-02 16:55:18] Production.INFO: count ==3199 [2025-03-02 16:55:20] Production.ERROR: pbx CDR StartTime 2025-03-02 13:55:06 - End Time 2025-03-02 16:55:06 [2025-03-02 16:55:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:55:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592492', 'tblTempUsageDetail_20' ) start [2025-03-02 16:55:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592492', 'tblTempUsageDetail_20' ) end [2025-03-02 16:55:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592492', 'tblTempVendorCDR_20' ) start [2025-03-02 16:55:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592492', 'tblTempVendorCDR_20' ) end [2025-03-02 16:55:20] Production.INFO: ProcessCDR(1,14592492,1,1,2) [2025-03-02 16:55:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592492,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:55:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592492,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:55:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592492,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:55:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592492,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:55:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592492', 'tblTempUsageDetail_20' ) start [2025-03-02 16:55:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592492', 'tblTempUsageDetail_20' ) end [2025-03-02 16:55:25] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:55:25] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:55:25] Production.INFO: ==9266== Releasing lock... [2025-03-02 16:55:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:55:25] Production.INFO: 51.75 MB #Memory Used# [2025-03-02 16:56:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:56:05 [end_date_ymd] => 2025-03-02 16:56:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:56:05' and `end` < '2025-03-02 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-03-02 16:56:18] Production.INFO: count ==3202 [2025-03-02 16:56:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:56:05 - End Time 2025-03-02 16:56:05 [2025-03-02 16:56:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:56:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592497', 'tblTempUsageDetail_20' ) start [2025-03-02 16:56:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592497', 'tblTempUsageDetail_20' ) end [2025-03-02 16:56:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592497', 'tblTempVendorCDR_20' ) start [2025-03-02 16:56:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592497', 'tblTempVendorCDR_20' ) end [2025-03-02 16:56:19] Production.INFO: ProcessCDR(1,14592497,1,1,2) [2025-03-02 16:56:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592497,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:56:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592497,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:56:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592497,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:56:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592497,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:56:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592497', 'tblTempUsageDetail_20' ) start [2025-03-02 16:56:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592497', 'tblTempUsageDetail_20' ) end [2025-03-02 16:56:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:56:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:56:24] Production.INFO: ==9390== Releasing lock... [2025-03-02 16:56:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:56:24] Production.INFO: 51.75 MB #Memory Used# [2025-03-02 16:57:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:57:06 [end_date_ymd] => 2025-03-02 16:57:06 [RateCDR] => 1 ) [2025-03-02 16: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-03-02 13:57:06' and `end` < '2025-03-02 16: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-03-02 16:57:18] Production.INFO: count ==3201 [2025-03-02 16:57:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:57:06 - End Time 2025-03-02 16:57:06 [2025-03-02 16:57:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:57:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592502', 'tblTempUsageDetail_20' ) start [2025-03-02 16:57:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592502', 'tblTempUsageDetail_20' ) end [2025-03-02 16:57:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592502', 'tblTempVendorCDR_20' ) start [2025-03-02 16:57:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592502', 'tblTempVendorCDR_20' ) end [2025-03-02 16:57:19] Production.INFO: ProcessCDR(1,14592502,1,1,2) [2025-03-02 16:57:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592502,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:57:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592502,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:57:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592502,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:57:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592502,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:57:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592502', 'tblTempUsageDetail_20' ) start [2025-03-02 16:57:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592502', 'tblTempUsageDetail_20' ) end [2025-03-02 16:57:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:57:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:57:24] Production.INFO: ==9503== Releasing lock... [2025-03-02 16:57:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:57:24] Production.INFO: 51.75 MB #Memory Used# [2025-03-02 16:58:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:58:05 [end_date_ymd] => 2025-03-02 16:58:05 [RateCDR] => 1 ) [2025-03-02 16: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-03-02 13:58:05' and `end` < '2025-03-02 16: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-03-02 16:58:18] Production.INFO: count ==3205 [2025-03-02 16:58:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:58:05 - End Time 2025-03-02 16:58:05 [2025-03-02 16:58:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:58:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592507', 'tblTempUsageDetail_20' ) start [2025-03-02 16:58:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592507', 'tblTempUsageDetail_20' ) end [2025-03-02 16:58:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592507', 'tblTempVendorCDR_20' ) start [2025-03-02 16:58:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592507', 'tblTempVendorCDR_20' ) end [2025-03-02 16:58:19] Production.INFO: ProcessCDR(1,14592507,1,1,2) [2025-03-02 16:58:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592507,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:58:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592507,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:58:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592507,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:58:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592507,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:58:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592507', 'tblTempUsageDetail_20' ) start [2025-03-02 16:58:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592507', 'tblTempUsageDetail_20' ) end [2025-03-02 16:58:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:58:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:58:24] Production.INFO: ==9618== Releasing lock... [2025-03-02 16:58:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:58:24] Production.INFO: 51.75 MB #Memory Used# [2025-03-02 16:59:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 13:59:06 [end_date_ymd] => 2025-03-02 16:59:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 13:59:06' and `end` < '2025-03-02 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-03-02 16:59:18] Production.INFO: count ==3194 [2025-03-02 16:59:19] Production.ERROR: pbx CDR StartTime 2025-03-02 13:59:06 - End Time 2025-03-02 16:59:06 [2025-03-02 16:59:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 16:59:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592512', 'tblTempUsageDetail_20' ) start [2025-03-02 16:59:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592512', 'tblTempUsageDetail_20' ) end [2025-03-02 16:59:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592512', 'tblTempVendorCDR_20' ) start [2025-03-02 16:59:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592512', 'tblTempVendorCDR_20' ) end [2025-03-02 16:59:19] Production.INFO: ProcessCDR(1,14592512,1,1,2) [2025-03-02 16:59:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592512,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:59:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592512,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 16:59:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592512,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:59:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592512,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 16:59:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592512', 'tblTempUsageDetail_20' ) start [2025-03-02 16:59:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592512', 'tblTempUsageDetail_20' ) end [2025-03-02 16:59:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 16:59:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 16:59:24] Production.INFO: ==9750== Releasing lock... [2025-03-02 16:59:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 16:59:24] Production.INFO: 51.75 MB #Memory Used# [2025-03-02 17:00:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:00:07 [end_date_ymd] => 2025-03-02 17:00:07 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:00:07' and `end` < '2025-03-02 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-03-02 17:00:19] Production.INFO: count ==3205 [2025-03-02 17:00:20] Production.ERROR: pbx CDR StartTime 2025-03-02 14:00:07 - End Time 2025-03-02 17:00:07 [2025-03-02 17:00:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:00:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592518', 'tblTempUsageDetail_20' ) start [2025-03-02 17:00:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592518', 'tblTempUsageDetail_20' ) end [2025-03-02 17:00:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592518', 'tblTempVendorCDR_20' ) start [2025-03-02 17:00:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592518', 'tblTempVendorCDR_20' ) end [2025-03-02 17:00:21] Production.INFO: ProcessCDR(1,14592518,1,1,2) [2025-03-02 17:00:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592518,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:00:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592518,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:00:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592518,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:00:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592518,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:00:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592518', 'tblTempUsageDetail_20' ) start [2025-03-02 17:00:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592518', 'tblTempUsageDetail_20' ) end [2025-03-02 17:00:25] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:00:25] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:00:25] Production.INFO: ==9874== Releasing lock... [2025-03-02 17:00:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:00:25] Production.INFO: 51.75 MB #Memory Used# [2025-03-02 17:01:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:01:05 [end_date_ymd] => 2025-03-02 17:01:05 [RateCDR] => 1 ) [2025-03-02 17: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-03-02 14:01:05' and `end` < '2025-03-02 17: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-03-02 17:01:18] Production.INFO: count ==3225 [2025-03-02 17:01:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:01:05 - End Time 2025-03-02 17:01:05 [2025-03-02 17:01:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:01:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592523', 'tblTempUsageDetail_20' ) start [2025-03-02 17:01:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592523', 'tblTempUsageDetail_20' ) end [2025-03-02 17:01:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592523', 'tblTempVendorCDR_20' ) start [2025-03-02 17:01:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592523', 'tblTempVendorCDR_20' ) end [2025-03-02 17:01:19] Production.INFO: ProcessCDR(1,14592523,1,1,2) [2025-03-02 17:01:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592523,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:01:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592523,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:01:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592523,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:01:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592523,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:01:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592523', 'tblTempUsageDetail_20' ) start [2025-03-02 17:01:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592523', 'tblTempUsageDetail_20' ) end [2025-03-02 17:01:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:01:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:01:24] Production.INFO: ==10015== Releasing lock... [2025-03-02 17:01:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:01:24] Production.INFO: 52 MB #Memory Used# [2025-03-02 17:02:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:02:05 [end_date_ymd] => 2025-03-02 17:02:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:02:05' and `end` < '2025-03-02 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-03-02 17:02:17] Production.INFO: count ==3227 [2025-03-02 17:02:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:02:05 - End Time 2025-03-02 17:02:05 [2025-03-02 17:02:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:02:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592528', 'tblTempUsageDetail_20' ) start [2025-03-02 17:02:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592528', 'tblTempUsageDetail_20' ) end [2025-03-02 17:02:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592528', 'tblTempVendorCDR_20' ) start [2025-03-02 17:02:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592528', 'tblTempVendorCDR_20' ) end [2025-03-02 17:02:19] Production.INFO: ProcessCDR(1,14592528,1,1,2) [2025-03-02 17:02:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592528,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:02:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592528,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:02:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592528,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:02:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592528,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:02:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592528', 'tblTempUsageDetail_20' ) start [2025-03-02 17:02:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592528', 'tblTempUsageDetail_20' ) end [2025-03-02 17:02:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:02:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:02:24] Production.INFO: ==10126== Releasing lock... [2025-03-02 17:02:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:02:24] Production.INFO: 52 MB #Memory Used# [2025-03-02 17:03:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:03:05 [end_date_ymd] => 2025-03-02 17:03:05 [RateCDR] => 1 ) [2025-03-02 17: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-03-02 14:03:05' and `end` < '2025-03-02 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-03-02 17:03:18] Production.INFO: count ==3229 [2025-03-02 17:03:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:03:05 - End Time 2025-03-02 17:03:05 [2025-03-02 17:03:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:03:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592533', 'tblTempUsageDetail_20' ) start [2025-03-02 17:03:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592533', 'tblTempUsageDetail_20' ) end [2025-03-02 17:03:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592533', 'tblTempVendorCDR_20' ) start [2025-03-02 17:03:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592533', 'tblTempVendorCDR_20' ) end [2025-03-02 17:03:19] Production.INFO: ProcessCDR(1,14592533,1,1,2) [2025-03-02 17:03:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592533,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:03:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592533,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:03:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592533,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:03:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592533,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:03:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592533', 'tblTempUsageDetail_20' ) start [2025-03-02 17:03:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592533', 'tblTempUsageDetail_20' ) end [2025-03-02 17:03:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:03:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:03:24] Production.INFO: ==10240== Releasing lock... [2025-03-02 17:03:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:03:24] Production.INFO: 52 MB #Memory Used# [2025-03-02 17:04:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:04:05 [end_date_ymd] => 2025-03-02 17:04:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:04:05' and `end` < '2025-03-02 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-03-02 17:04:17] Production.INFO: count ==3230 [2025-03-02 17:04:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:04:05 - End Time 2025-03-02 17:04:05 [2025-03-02 17:04:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:04:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592538', 'tblTempUsageDetail_20' ) start [2025-03-02 17:04:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592538', 'tblTempUsageDetail_20' ) end [2025-03-02 17:04:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592538', 'tblTempVendorCDR_20' ) start [2025-03-02 17:04:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592538', 'tblTempVendorCDR_20' ) end [2025-03-02 17:04:19] Production.INFO: ProcessCDR(1,14592538,1,1,2) [2025-03-02 17:04:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592538,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:04:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592538,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:04:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592538,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:04:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592538,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:04:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592538', 'tblTempUsageDetail_20' ) start [2025-03-02 17:04:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592538', 'tblTempUsageDetail_20' ) end [2025-03-02 17:04:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:04:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:04:23] Production.INFO: ==10358== Releasing lock... [2025-03-02 17:04:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:04:23] Production.INFO: 52 MB #Memory Used# [2025-03-02 17:05:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:05:05 [end_date_ymd] => 2025-03-02 17:05:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:05:05' and `end` < '2025-03-02 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-03-02 17:05:17] Production.INFO: count ==3220 [2025-03-02 17:05:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:05:05 - End Time 2025-03-02 17:05:05 [2025-03-02 17:05:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:05:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592543', 'tblTempUsageDetail_20' ) start [2025-03-02 17:05:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592543', 'tblTempUsageDetail_20' ) end [2025-03-02 17:05:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592543', 'tblTempVendorCDR_20' ) start [2025-03-02 17:05:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592543', 'tblTempVendorCDR_20' ) end [2025-03-02 17:05:19] Production.INFO: ProcessCDR(1,14592543,1,1,2) [2025-03-02 17:05:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592543,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:05:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592543,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:05:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592543,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:05:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592543,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:05:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592543', 'tblTempUsageDetail_20' ) start [2025-03-02 17:05:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592543', 'tblTempUsageDetail_20' ) end [2025-03-02 17:05:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:05:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:05:23] Production.INFO: ==10483== Releasing lock... [2025-03-02 17:05:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:05:23] Production.INFO: 52 MB #Memory Used# [2025-03-02 17:06:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:06:05 [end_date_ymd] => 2025-03-02 17:06:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:06:05' and `end` < '2025-03-02 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-03-02 17:06:18] Production.INFO: count ==3223 [2025-03-02 17:06:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:06:05 - End Time 2025-03-02 17:06:05 [2025-03-02 17:06:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:06:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592548', 'tblTempUsageDetail_20' ) start [2025-03-02 17:06:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592548', 'tblTempUsageDetail_20' ) end [2025-03-02 17:06:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592548', 'tblTempVendorCDR_20' ) start [2025-03-02 17:06:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592548', 'tblTempVendorCDR_20' ) end [2025-03-02 17:06:19] Production.INFO: ProcessCDR(1,14592548,1,1,2) [2025-03-02 17:06:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592548,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:06:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592548,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:06:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592548,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:06:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592548,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:06:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592548', 'tblTempUsageDetail_20' ) start [2025-03-02 17:06:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592548', 'tblTempUsageDetail_20' ) end [2025-03-02 17:06:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:06:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:06:24] Production.INFO: ==10606== Releasing lock... [2025-03-02 17:06:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:06:24] Production.INFO: 52 MB #Memory Used# [2025-03-02 17:07:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:07:05 [end_date_ymd] => 2025-03-02 17:07:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:07:05' and `end` < '2025-03-02 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-03-02 17:07:18] Production.INFO: count ==3224 [2025-03-02 17:07:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:07:05 - End Time 2025-03-02 17:07:05 [2025-03-02 17:07:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:07:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592553', 'tblTempUsageDetail_20' ) start [2025-03-02 17:07:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592553', 'tblTempUsageDetail_20' ) end [2025-03-02 17:07:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592553', 'tblTempVendorCDR_20' ) start [2025-03-02 17:07:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592553', 'tblTempVendorCDR_20' ) end [2025-03-02 17:07:20] Production.INFO: ProcessCDR(1,14592553,1,1,2) [2025-03-02 17:07:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592553,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:07:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592553,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:07:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592553,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:07:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592553,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:07:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592553', 'tblTempUsageDetail_20' ) start [2025-03-02 17:07:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592553', 'tblTempUsageDetail_20' ) end [2025-03-02 17:07:25] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:07:25] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:07:25] Production.INFO: ==10733== Releasing lock... [2025-03-02 17:07:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:07:25] Production.INFO: 52 MB #Memory Used# [2025-03-02 17:08:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:08:06 [end_date_ymd] => 2025-03-02 17:08:06 [RateCDR] => 1 ) [2025-03-02 17: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-03-02 14:08:06' and `end` < '2025-03-02 17: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-03-02 17:08:18] Production.INFO: count ==3224 [2025-03-02 17:08:20] Production.ERROR: pbx CDR StartTime 2025-03-02 14:08:06 - End Time 2025-03-02 17:08:06 [2025-03-02 17:08:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:08:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592558', 'tblTempUsageDetail_20' ) start [2025-03-02 17:08:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592558', 'tblTempUsageDetail_20' ) end [2025-03-02 17:08:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592558', 'tblTempVendorCDR_20' ) start [2025-03-02 17:08:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592558', 'tblTempVendorCDR_20' ) end [2025-03-02 17:08:20] Production.INFO: ProcessCDR(1,14592558,1,1,2) [2025-03-02 17:08:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592558,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:08:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592558,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:08:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592558,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:08:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592558,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:08:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592558', 'tblTempUsageDetail_20' ) start [2025-03-02 17:08:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592558', 'tblTempUsageDetail_20' ) end [2025-03-02 17:08:25] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:08:25] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:08:25] Production.INFO: ==10906== Releasing lock... [2025-03-02 17:08:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:08:25] Production.INFO: 52 MB #Memory Used# [2025-03-02 17:09:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:09:06 [end_date_ymd] => 2025-03-02 17:09:06 [RateCDR] => 1 ) [2025-03-02 17: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-03-02 14:09:06' and `end` < '2025-03-02 17: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-03-02 17:09:18] Production.INFO: count ==3225 [2025-03-02 17:09:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:09:06 - End Time 2025-03-02 17:09:06 [2025-03-02 17:09:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:09:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592563', 'tblTempUsageDetail_20' ) start [2025-03-02 17:09:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592563', 'tblTempUsageDetail_20' ) end [2025-03-02 17:09:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592563', 'tblTempVendorCDR_20' ) start [2025-03-02 17:09:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592563', 'tblTempVendorCDR_20' ) end [2025-03-02 17:09:19] Production.INFO: ProcessCDR(1,14592563,1,1,2) [2025-03-02 17:09:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592563,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:09:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592563,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:09:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592563,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:09:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592563,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:09:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592563', 'tblTempUsageDetail_20' ) start [2025-03-02 17:09:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592563', 'tblTempUsageDetail_20' ) end [2025-03-02 17:09:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:09:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:09:24] Production.INFO: ==11036== Releasing lock... [2025-03-02 17:09:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:09:24] Production.INFO: 52 MB #Memory Used# [2025-03-02 17:10:07] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:10:07 [end_date_ymd] => 2025-03-02 17:10:07 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:10:07' and `end` < '2025-03-02 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-03-02 17:10:20] Production.INFO: count ==3228 [2025-03-02 17:10:21] Production.ERROR: pbx CDR StartTime 2025-03-02 14:10:07 - End Time 2025-03-02 17:10:07 [2025-03-02 17:10:21] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:10:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592569', 'tblTempUsageDetail_20' ) start [2025-03-02 17:10:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592569', 'tblTempUsageDetail_20' ) end [2025-03-02 17:10:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592569', 'tblTempVendorCDR_20' ) start [2025-03-02 17:10:21] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592569', 'tblTempVendorCDR_20' ) end [2025-03-02 17:10:21] Production.INFO: ProcessCDR(1,14592569,1,1,2) [2025-03-02 17:10:21] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592569,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:10:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592569,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:10:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592569,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:10:26] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592569,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:10:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592569', 'tblTempUsageDetail_20' ) start [2025-03-02 17:10:26] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592569', 'tblTempUsageDetail_20' ) end [2025-03-02 17:10:26] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:10:26] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:10:26] Production.INFO: ==11157== Releasing lock... [2025-03-02 17:10:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:10:26] Production.INFO: 52 MB #Memory Used# [2025-03-02 17:11:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:11:05 [end_date_ymd] => 2025-03-02 17:11:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:11:05' and `end` < '2025-03-02 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-03-02 17:11:18] Production.INFO: count ==3254 [2025-03-02 17:11:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:11:05 - End Time 2025-03-02 17:11:05 [2025-03-02 17:11:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:11:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592574', 'tblTempUsageDetail_20' ) start [2025-03-02 17:11:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592574', 'tblTempUsageDetail_20' ) end [2025-03-02 17:11:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592574', 'tblTempVendorCDR_20' ) start [2025-03-02 17:11:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592574', 'tblTempVendorCDR_20' ) end [2025-03-02 17:11:19] Production.INFO: ProcessCDR(1,14592574,1,1,2) [2025-03-02 17:11:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592574,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:11:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592574,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:11:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592574,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:11:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592574,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:11:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592574', 'tblTempUsageDetail_20' ) start [2025-03-02 17:11:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592574', 'tblTempUsageDetail_20' ) end [2025-03-02 17:11:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:11:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:11:24] Production.INFO: ==11273== Releasing lock... [2025-03-02 17:11:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:11:24] Production.INFO: 52.25 MB #Memory Used# [2025-03-02 17:12:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:12:05 [end_date_ymd] => 2025-03-02 17:12:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:12:05' and `end` < '2025-03-02 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-03-02 17:12:18] Production.INFO: count ==3253 [2025-03-02 17:12:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:12:05 - End Time 2025-03-02 17:12:05 [2025-03-02 17:12:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:12:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592579', 'tblTempUsageDetail_20' ) start [2025-03-02 17:12:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592579', 'tblTempUsageDetail_20' ) end [2025-03-02 17:12:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592579', 'tblTempVendorCDR_20' ) start [2025-03-02 17:12:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592579', 'tblTempVendorCDR_20' ) end [2025-03-02 17:12:19] Production.INFO: ProcessCDR(1,14592579,1,1,2) [2025-03-02 17:12:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592579,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:12:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592579,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:12:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592579,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:12:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592579,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:12:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592579', 'tblTempUsageDetail_20' ) start [2025-03-02 17:12:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592579', 'tblTempUsageDetail_20' ) end [2025-03-02 17:12:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:12:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:12:24] Production.INFO: ==11404== Releasing lock... [2025-03-02 17:12:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:12:24] Production.INFO: 52.25 MB #Memory Used# [2025-03-02 17:13:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:13:06 [end_date_ymd] => 2025-03-02 17:13:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:13:06' and `end` < '2025-03-02 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-03-02 17:13:18] Production.INFO: count ==3254 [2025-03-02 17:13:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:13:06 - End Time 2025-03-02 17:13:06 [2025-03-02 17:13:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:13:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592584', 'tblTempUsageDetail_20' ) start [2025-03-02 17:13:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592584', 'tblTempUsageDetail_20' ) end [2025-03-02 17:13:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592584', 'tblTempVendorCDR_20' ) start [2025-03-02 17:13:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592584', 'tblTempVendorCDR_20' ) end [2025-03-02 17:13:19] Production.INFO: ProcessCDR(1,14592584,1,1,2) [2025-03-02 17:13:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592584,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:13:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592584,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:13:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592584,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:13:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592584,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:13:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592584', 'tblTempUsageDetail_20' ) start [2025-03-02 17:13:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592584', 'tblTempUsageDetail_20' ) end [2025-03-02 17:13:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:13:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:13:24] Production.INFO: ==11528== Releasing lock... [2025-03-02 17:13:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:13:24] Production.INFO: 52.25 MB #Memory Used# [2025-03-02 17:14:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:14:06 [end_date_ymd] => 2025-03-02 17:14:06 [RateCDR] => 1 ) [2025-03-02 17: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-03-02 14:14:06' and `end` < '2025-03-02 17: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-03-02 17:14:18] Production.INFO: count ==3257 [2025-03-02 17:14:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:14:06 - End Time 2025-03-02 17:14:06 [2025-03-02 17:14:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:14:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592589', 'tblTempUsageDetail_20' ) start [2025-03-02 17:14:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592589', 'tblTempUsageDetail_20' ) end [2025-03-02 17:14:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592589', 'tblTempVendorCDR_20' ) start [2025-03-02 17:14:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592589', 'tblTempVendorCDR_20' ) end [2025-03-02 17:14:19] Production.INFO: ProcessCDR(1,14592589,1,1,2) [2025-03-02 17:14:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592589,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:14:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592589,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:14:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592589,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:14:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592589,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:14:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592589', 'tblTempUsageDetail_20' ) start [2025-03-02 17:14:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592589', 'tblTempUsageDetail_20' ) end [2025-03-02 17:14:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:14:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:14:22] Production.INFO: ==11641== Releasing lock... [2025-03-02 17:14:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:14:22] Production.INFO: 52.25 MB #Memory Used# [2025-03-02 17:15:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:15:05 [end_date_ymd] => 2025-03-02 17:15:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:15:05' and `end` < '2025-03-02 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-03-02 17:15:17] Production.INFO: count ==3263 [2025-03-02 17:15:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:15:05 - End Time 2025-03-02 17:15:05 [2025-03-02 17:15:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:15:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592594', 'tblTempUsageDetail_20' ) start [2025-03-02 17:15:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592594', 'tblTempUsageDetail_20' ) end [2025-03-02 17:15:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592594', 'tblTempVendorCDR_20' ) start [2025-03-02 17:15:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592594', 'tblTempVendorCDR_20' ) end [2025-03-02 17:15:19] Production.INFO: ProcessCDR(1,14592594,1,1,2) [2025-03-02 17:15:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592594,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:15:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592594,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:15:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592594,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:15:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592594,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:15:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592594', 'tblTempUsageDetail_20' ) start [2025-03-02 17:15:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592594', 'tblTempUsageDetail_20' ) end [2025-03-02 17:15:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:15:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:15:22] Production.INFO: ==11761== Releasing lock... [2025-03-02 17:15:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:15:22] Production.INFO: 52.25 MB #Memory Used# [2025-03-02 17:16:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:16:06 [end_date_ymd] => 2025-03-02 17:16:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:16:06' and `end` < '2025-03-02 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-03-02 17:16:19] Production.INFO: count ==3265 [2025-03-02 17:16:20] Production.ERROR: pbx CDR StartTime 2025-03-02 14:16:06 - End Time 2025-03-02 17:16:06 [2025-03-02 17:16:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:16:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592599', 'tblTempUsageDetail_20' ) start [2025-03-02 17:16:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592599', 'tblTempUsageDetail_20' ) end [2025-03-02 17:16:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592599', 'tblTempVendorCDR_20' ) start [2025-03-02 17:16:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592599', 'tblTempVendorCDR_20' ) end [2025-03-02 17:16:20] Production.INFO: ProcessCDR(1,14592599,1,1,2) [2025-03-02 17:16:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592599,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:16:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592599,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:16:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592599,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:16:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592599,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:16:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592599', 'tblTempUsageDetail_20' ) start [2025-03-02 17:16:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592599', 'tblTempUsageDetail_20' ) end [2025-03-02 17:16:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:16:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:16:24] Production.INFO: ==11892== Releasing lock... [2025-03-02 17:16:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:16:24] Production.INFO: 52.25 MB #Memory Used# [2025-03-02 17:17:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:17:05 [end_date_ymd] => 2025-03-02 17:17:05 [RateCDR] => 1 ) [2025-03-02 17: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-03-02 14:17:05' and `end` < '2025-03-02 17: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-03-02 17:17:17] Production.INFO: count ==3267 [2025-03-02 17:17:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:17:05 - End Time 2025-03-02 17:17:05 [2025-03-02 17:17:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:17:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592604', 'tblTempUsageDetail_20' ) start [2025-03-02 17:17:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592604', 'tblTempUsageDetail_20' ) end [2025-03-02 17:17:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592604', 'tblTempVendorCDR_20' ) start [2025-03-02 17:17:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592604', 'tblTempVendorCDR_20' ) end [2025-03-02 17:17:19] Production.INFO: ProcessCDR(1,14592604,1,1,2) [2025-03-02 17:17:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592604,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:17:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592604,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:17:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592604,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:17:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592604,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:17:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592604', 'tblTempUsageDetail_20' ) start [2025-03-02 17:17:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592604', 'tblTempUsageDetail_20' ) end [2025-03-02 17:17:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:17:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:17:24] Production.INFO: ==12001== Releasing lock... [2025-03-02 17:17:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:17:24] Production.INFO: 52.25 MB #Memory Used# [2025-03-02 17:18:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:18:06 [end_date_ymd] => 2025-03-02 17:18:06 [RateCDR] => 1 ) [2025-03-02 17: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-03-02 14:18:06' and `end` < '2025-03-02 17: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-03-02 17:18:18] Production.INFO: count ==3273 [2025-03-02 17:18:20] Production.ERROR: pbx CDR StartTime 2025-03-02 14:18:06 - End Time 2025-03-02 17:18:06 [2025-03-02 17:18:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:18:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592609', 'tblTempUsageDetail_20' ) start [2025-03-02 17:18:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592609', 'tblTempUsageDetail_20' ) end [2025-03-02 17:18:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592609', 'tblTempVendorCDR_20' ) start [2025-03-02 17:18:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592609', 'tblTempVendorCDR_20' ) end [2025-03-02 17:18:20] Production.INFO: ProcessCDR(1,14592609,1,1,2) [2025-03-02 17:18:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592609,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:18:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592609,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:18:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592609,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:18:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592609,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:18:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592609', 'tblTempUsageDetail_20' ) start [2025-03-02 17:18:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592609', 'tblTempUsageDetail_20' ) end [2025-03-02 17:18:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:18:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:18:24] Production.INFO: ==12118== Releasing lock... [2025-03-02 17:18:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:18:24] Production.INFO: 52.25 MB #Memory Used# [2025-03-02 17:19:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:19:05 [end_date_ymd] => 2025-03-02 17:19:05 [RateCDR] => 1 ) [2025-03-02 17: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-03-02 14:19:05' and `end` < '2025-03-02 17: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-03-02 17:19:17] Production.INFO: count ==3246 [2025-03-02 17:19:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:19:05 - End Time 2025-03-02 17:19:05 [2025-03-02 17:19:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:19:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592614', 'tblTempUsageDetail_20' ) start [2025-03-02 17:19:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592614', 'tblTempUsageDetail_20' ) end [2025-03-02 17:19:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592614', 'tblTempVendorCDR_20' ) start [2025-03-02 17:19:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592614', 'tblTempVendorCDR_20' ) end [2025-03-02 17:19:19] Production.INFO: ProcessCDR(1,14592614,1,1,2) [2025-03-02 17:19:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592614,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:19:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592614,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:19:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592614,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:19:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592614,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:19:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592614', 'tblTempUsageDetail_20' ) start [2025-03-02 17:19:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592614', 'tblTempUsageDetail_20' ) end [2025-03-02 17:19:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:19:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:19:22] Production.INFO: ==12226== Releasing lock... [2025-03-02 17:19:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:19:22] Production.INFO: 52.25 MB #Memory Used# [2025-03-02 17:20:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:20:06 [end_date_ymd] => 2025-03-02 17:20:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:20:06' and `end` < '2025-03-02 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-03-02 17:20:19] Production.INFO: count ==3236 [2025-03-02 17:20:20] Production.ERROR: pbx CDR StartTime 2025-03-02 14:20:06 - End Time 2025-03-02 17:20:06 [2025-03-02 17:20:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:20:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592620', 'tblTempUsageDetail_20' ) start [2025-03-02 17:20:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592620', 'tblTempUsageDetail_20' ) end [2025-03-02 17:20:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592620', 'tblTempVendorCDR_20' ) start [2025-03-02 17:20:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592620', 'tblTempVendorCDR_20' ) end [2025-03-02 17:20:20] Production.INFO: ProcessCDR(1,14592620,1,1,2) [2025-03-02 17:20:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592620,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:20:23] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592620,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:20:23] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592620,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:20:25] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592620,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:20:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592620', 'tblTempUsageDetail_20' ) start [2025-03-02 17:20:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592620', 'tblTempUsageDetail_20' ) end [2025-03-02 17:20:25] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:20:25] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:20:25] Production.INFO: ==12346== Releasing lock... [2025-03-02 17:20:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:20:25] Production.INFO: 52 MB #Memory Used# [2025-03-02 17:21:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:21:05 [end_date_ymd] => 2025-03-02 17:21:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:21:05' and `end` < '2025-03-02 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-03-02 17:21:18] Production.INFO: count ==3230 [2025-03-02 17:21:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:21:05 - End Time 2025-03-02 17:21:05 [2025-03-02 17:21:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:21:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592625', 'tblTempUsageDetail_20' ) start [2025-03-02 17:21:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592625', 'tblTempUsageDetail_20' ) end [2025-03-02 17:21:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592625', 'tblTempVendorCDR_20' ) start [2025-03-02 17:21:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592625', 'tblTempVendorCDR_20' ) end [2025-03-02 17:21:19] Production.INFO: ProcessCDR(1,14592625,1,1,2) [2025-03-02 17:21:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592625,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:21:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592625,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:21:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592625,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:21:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592625,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:21:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592625', 'tblTempUsageDetail_20' ) start [2025-03-02 17:21:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592625', 'tblTempUsageDetail_20' ) end [2025-03-02 17:21:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:21:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:21:24] Production.INFO: ==12472== Releasing lock... [2025-03-02 17:21:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:21:24] Production.INFO: 52 MB #Memory Used# [2025-03-02 17:22:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:22:06 [end_date_ymd] => 2025-03-02 17:22:06 [RateCDR] => 1 ) [2025-03-02 17: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-03-02 14:22:06' and `end` < '2025-03-02 17: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-03-02 17:22:18] Production.INFO: count ==3221 [2025-03-02 17:22:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:22:06 - End Time 2025-03-02 17:22:06 [2025-03-02 17:22:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:22:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592630', 'tblTempUsageDetail_20' ) start [2025-03-02 17:22:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592630', 'tblTempUsageDetail_20' ) end [2025-03-02 17:22:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592630', 'tblTempVendorCDR_20' ) start [2025-03-02 17:22:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592630', 'tblTempVendorCDR_20' ) end [2025-03-02 17:22:19] Production.INFO: ProcessCDR(1,14592630,1,1,2) [2025-03-02 17:22:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592630,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:22:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592630,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:22:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592630,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:22:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592630,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:22:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592630', 'tblTempUsageDetail_20' ) start [2025-03-02 17:22:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592630', 'tblTempUsageDetail_20' ) end [2025-03-02 17:22:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:22:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:22:22] Production.INFO: ==12588== Releasing lock... [2025-03-02 17:22:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:22:22] Production.INFO: 52 MB #Memory Used# [2025-03-02 17:23:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:23:04 [end_date_ymd] => 2025-03-02 17:23:04 [RateCDR] => 1 ) [2025-03-02 17:23: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-03-02 14:23:04' and `end` < '2025-03-02 17:23: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-03-02 17:23:17] Production.INFO: count ==3223 [2025-03-02 17:23:18] Production.ERROR: pbx CDR StartTime 2025-03-02 14:23:04 - End Time 2025-03-02 17:23:04 [2025-03-02 17:23:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:23:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592635', 'tblTempUsageDetail_20' ) start [2025-03-02 17:23:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592635', 'tblTempUsageDetail_20' ) end [2025-03-02 17:23:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592635', 'tblTempVendorCDR_20' ) start [2025-03-02 17:23:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592635', 'tblTempVendorCDR_20' ) end [2025-03-02 17:23:18] Production.INFO: ProcessCDR(1,14592635,1,1,2) [2025-03-02 17:23:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592635,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:23:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592635,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:23:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592635,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:23:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592635,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:23:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592635', 'tblTempUsageDetail_20' ) start [2025-03-02 17:23:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592635', 'tblTempUsageDetail_20' ) end [2025-03-02 17:23:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:23:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:23:23] Production.INFO: ==12711== Releasing lock... [2025-03-02 17:23:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:23:23] Production.INFO: 52 MB #Memory Used# [2025-03-02 17:24:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:24:05 [end_date_ymd] => 2025-03-02 17:24:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:24:05' and `end` < '2025-03-02 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-03-02 17:24:17] Production.INFO: count ==3225 [2025-03-02 17:24:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:24:05 - End Time 2025-03-02 17:24:05 [2025-03-02 17:24:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:24:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592640', 'tblTempUsageDetail_20' ) start [2025-03-02 17:24:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592640', 'tblTempUsageDetail_20' ) end [2025-03-02 17:24:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592640', 'tblTempVendorCDR_20' ) start [2025-03-02 17:24:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592640', 'tblTempVendorCDR_20' ) end [2025-03-02 17:24:19] Production.INFO: ProcessCDR(1,14592640,1,1,2) [2025-03-02 17:24:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592640,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:24:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592640,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:24:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592640,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:24:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592640,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:24:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592640', 'tblTempUsageDetail_20' ) start [2025-03-02 17:24:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592640', 'tblTempUsageDetail_20' ) end [2025-03-02 17:24:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:24:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:24:24] Production.INFO: ==12876== Releasing lock... [2025-03-02 17:24:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:24:24] Production.INFO: 52 MB #Memory Used# [2025-03-02 17:25:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:25:05 [end_date_ymd] => 2025-03-02 17:25:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:25:05' and `end` < '2025-03-02 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-03-02 17:25:17] Production.INFO: count ==3226 [2025-03-02 17:25:18] Production.ERROR: pbx CDR StartTime 2025-03-02 14:25:05 - End Time 2025-03-02 17:25:05 [2025-03-02 17:25:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:25:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592645', 'tblTempUsageDetail_20' ) start [2025-03-02 17:25:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592645', 'tblTempUsageDetail_20' ) end [2025-03-02 17:25:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592645', 'tblTempVendorCDR_20' ) start [2025-03-02 17:25:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592645', 'tblTempVendorCDR_20' ) end [2025-03-02 17:25:19] Production.INFO: ProcessCDR(1,14592645,1,1,2) [2025-03-02 17:25:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592645,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:25:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592645,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:25:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592645,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:25:27] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592645,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:25:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592645', 'tblTempUsageDetail_20' ) start [2025-03-02 17:25:27] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592645', 'tblTempUsageDetail_20' ) end [2025-03-02 17:25:27] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:25:28] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:25:36] Production.INFO: ==12997== Releasing lock... [2025-03-02 17:25:36] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:25:36] Production.INFO: 52 MB #Memory Used# [2025-03-02 17:26:22] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:26:22 [end_date_ymd] => 2025-03-02 17:26:22 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:26:22' and `end` < '2025-03-02 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-03-02 17:26:34] Production.INFO: count ==3228 [2025-03-02 17:27:20] Production.ERROR: pbx CDR StartTime 2025-03-02 14:26:22 - End Time 2025-03-02 17:26:22 [2025-03-02 17:27:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:27:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592650', 'tblTempUsageDetail_20' ) start [2025-03-02 17:27:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592650', 'tblTempUsageDetail_20' ) end [2025-03-02 17:27:24] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592650', 'tblTempVendorCDR_20' ) start [2025-03-02 17:27:26] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592650', 'tblTempVendorCDR_20' ) end [2025-03-02 17:27:26] Production.INFO: ProcessCDR(1,14592650,1,1,2) [2025-03-02 17:27:26] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592650,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:27:39] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592650,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:27:39] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592650,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:28:04] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592650,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:28:04] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592650', 'tblTempUsageDetail_20' ) start [2025-03-02 17:28:13] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592650', 'tblTempUsageDetail_20' ) end [2025-03-02 17:28:13] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:28:14] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:28:18] Production.INFO: ==13113== Releasing lock... [2025-03-02 17:28:18] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:28:18] Production.INFO: 52 MB #Memory Used# [2025-03-02 17:29:25] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:29:25 [end_date_ymd] => 2025-03-02 17:29:25 [RateCDR] => 1 ) [2025-03-02 17:29:25] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 14:29:25' and `end` < '2025-03-02 17:29:25' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-02 17:29:38] Production.INFO: count ==3223 [2025-03-02 17:30:14] Production.ERROR: pbx CDR StartTime 2025-03-02 14:29:25 - End Time 2025-03-02 17:29:25 [2025-03-02 17:30:14] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:30:14] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592661', 'tblTempUsageDetail_20' ) start [2025-03-02 17:30:15] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592661', 'tblTempUsageDetail_20' ) end [2025-03-02 17:30:15] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592661', 'tblTempVendorCDR_20' ) start [2025-03-02 17:30:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592661', 'tblTempVendorCDR_20' ) end [2025-03-02 17:30:16] Production.INFO: ProcessCDR(1,14592661,1,1,2) [2025-03-02 17:30:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592661,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:30:41] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592661,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:30:41] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592661,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:31:36] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592661,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:31:36] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592661', 'tblTempUsageDetail_20' ) start [2025-03-02 17:31:49] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592661', 'tblTempUsageDetail_20' ) end [2025-03-02 17:31:49] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:31:49] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:31:57] Production.INFO: ==13430== Releasing lock... [2025-03-02 17:31:57] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:31:57] Production.INFO: 52 MB #Memory Used# [2025-03-02 17:32:53] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:32:53 [end_date_ymd] => 2025-03-02 17:32:53 [RateCDR] => 1 ) [2025-03-02 17:32:53] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 14:32:53' and `end` < '2025-03-02 17:32:53' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-02 17:33:05] Production.INFO: count ==3270 [2025-03-02 17:33:15] Production.ERROR: pbx CDR StartTime 2025-03-02 14:32:53 - End Time 2025-03-02 17:32:53 [2025-03-02 17:33:15] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:33:15] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592673', 'tblTempUsageDetail_20' ) start [2025-03-02 17:33:15] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592673', 'tblTempUsageDetail_20' ) end [2025-03-02 17:33:15] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592673', 'tblTempVendorCDR_20' ) start [2025-03-02 17:33:15] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592673', 'tblTempVendorCDR_20' ) end [2025-03-02 17:33:15] Production.INFO: ProcessCDR(1,14592673,1,1,2) [2025-03-02 17:33:15] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592673,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:33:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592673,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:33:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592673,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:33:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592673,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:33:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592673', 'tblTempUsageDetail_20' ) start [2025-03-02 17:33:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592673', 'tblTempUsageDetail_20' ) end [2025-03-02 17:33:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:33:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:33:23] Production.INFO: ==13760== Releasing lock... [2025-03-02 17:33:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:33:23] Production.INFO: 52.25 MB #Memory Used# [2025-03-02 17:34:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:34:05 [end_date_ymd] => 2025-03-02 17:34:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:34:05' and `end` < '2025-03-02 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-03-02 17:34:18] Production.INFO: count ==3271 [2025-03-02 17:34:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:34:05 - End Time 2025-03-02 17:34:05 [2025-03-02 17:34:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:34:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592680', 'tblTempUsageDetail_20' ) start [2025-03-02 17:34:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592680', 'tblTempUsageDetail_20' ) end [2025-03-02 17:34:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592680', 'tblTempVendorCDR_20' ) start [2025-03-02 17:34:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592680', 'tblTempVendorCDR_20' ) end [2025-03-02 17:34:19] Production.INFO: ProcessCDR(1,14592680,1,1,2) [2025-03-02 17:34:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592680,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:34:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592680,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:34:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592680,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:34:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592680,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:34:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592680', 'tblTempUsageDetail_20' ) start [2025-03-02 17:34:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592680', 'tblTempUsageDetail_20' ) end [2025-03-02 17:34:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:34:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:34:24] Production.INFO: ==13941== Releasing lock... [2025-03-02 17:34:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:34:24] Production.INFO: 52.25 MB #Memory Used# [2025-03-02 17:35:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:35:05 [end_date_ymd] => 2025-03-02 17:35:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:35:05' and `end` < '2025-03-02 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-03-02 17:35:17] Production.INFO: count ==3274 [2025-03-02 17:35:18] Production.ERROR: pbx CDR StartTime 2025-03-02 14:35:05 - End Time 2025-03-02 17:35:05 [2025-03-02 17:35:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592685', 'tblTempUsageDetail_20' ) start [2025-03-02 17:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592685', 'tblTempUsageDetail_20' ) end [2025-03-02 17:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592685', 'tblTempVendorCDR_20' ) start [2025-03-02 17:35:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592685', 'tblTempVendorCDR_20' ) end [2025-03-02 17:35:18] Production.INFO: ProcessCDR(1,14592685,1,1,2) [2025-03-02 17:35:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592685,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:35:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592685,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:35:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592685,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:35:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592685,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:35:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592685', 'tblTempUsageDetail_20' ) start [2025-03-02 17:35:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592685', 'tblTempUsageDetail_20' ) end [2025-03-02 17:35:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:35:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:35:24] Production.INFO: ==14046== Releasing lock... [2025-03-02 17:35:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:35:24] Production.INFO: 52.5 MB #Memory Used# [2025-03-02 17:36:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:36:06 [end_date_ymd] => 2025-03-02 17:36:06 [RateCDR] => 1 ) [2025-03-02 17: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-03-02 14:36:06' and `end` < '2025-03-02 17: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-03-02 17:36:18] Production.INFO: count ==3263 [2025-03-02 17:36:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:36:06 - End Time 2025-03-02 17:36:06 [2025-03-02 17:36:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:36:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592690', 'tblTempUsageDetail_20' ) start [2025-03-02 17:36:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592690', 'tblTempUsageDetail_20' ) end [2025-03-02 17:36:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592690', 'tblTempVendorCDR_20' ) start [2025-03-02 17:36:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592690', 'tblTempVendorCDR_20' ) end [2025-03-02 17:36:19] Production.INFO: ProcessCDR(1,14592690,1,1,2) [2025-03-02 17:36:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592690,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:36:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592690,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:36:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592690,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:36:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592690,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:36:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592690', 'tblTempUsageDetail_20' ) start [2025-03-02 17:36:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592690', 'tblTempUsageDetail_20' ) end [2025-03-02 17:36:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:36:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:36:24] Production.INFO: ==14166== Releasing lock... [2025-03-02 17:36:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:36:24] Production.INFO: 52.25 MB #Memory Used# [2025-03-02 17:37:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:37:05 [end_date_ymd] => 2025-03-02 17:37:05 [RateCDR] => 1 ) [2025-03-02 17: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-03-02 14:37:05' and `end` < '2025-03-02 17: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-03-02 17:37:18] Production.INFO: count ==3179 [2025-03-02 17:37:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:37:05 - End Time 2025-03-02 17:37:05 [2025-03-02 17:37:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:37:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592695', 'tblTempUsageDetail_20' ) start [2025-03-02 17:37:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592695', 'tblTempUsageDetail_20' ) end [2025-03-02 17:37:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592695', 'tblTempVendorCDR_20' ) start [2025-03-02 17:37:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592695', 'tblTempVendorCDR_20' ) end [2025-03-02 17:37:19] Production.INFO: ProcessCDR(1,14592695,1,1,2) [2025-03-02 17:37:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592695,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:37:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592695,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:37:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592695,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:37:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592695,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:37:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592695', 'tblTempUsageDetail_20' ) start [2025-03-02 17:37:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592695', 'tblTempUsageDetail_20' ) end [2025-03-02 17:37:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:37:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:37:24] Production.INFO: ==14275== Releasing lock... [2025-03-02 17:37:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:37:24] Production.INFO: 51.75 MB #Memory Used# [2025-03-02 17:38:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:38:06 [end_date_ymd] => 2025-03-02 17:38:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:38:06' and `end` < '2025-03-02 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-03-02 17:38:18] Production.INFO: count ==3128 [2025-03-02 17:38:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:38:06 - End Time 2025-03-02 17:38:06 [2025-03-02 17:38:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:38:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592700', 'tblTempUsageDetail_20' ) start [2025-03-02 17:38:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592700', 'tblTempUsageDetail_20' ) end [2025-03-02 17:38:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592700', 'tblTempVendorCDR_20' ) start [2025-03-02 17:38:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592700', 'tblTempVendorCDR_20' ) end [2025-03-02 17:38:19] Production.INFO: ProcessCDR(1,14592700,1,1,2) [2025-03-02 17:38:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592700,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:38:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592700,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:38:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592700,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:38:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592700,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:38:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592700', 'tblTempUsageDetail_20' ) start [2025-03-02 17:38:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592700', 'tblTempUsageDetail_20' ) end [2025-03-02 17:38:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:38:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:38:24] Production.INFO: ==14382== Releasing lock... [2025-03-02 17:38:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:38:24] Production.INFO: 51.25 MB #Memory Used# [2025-03-02 17:39:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:39:06 [end_date_ymd] => 2025-03-02 17:39:06 [RateCDR] => 1 ) [2025-03-02 17: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-03-02 14:39:06' and `end` < '2025-03-02 17: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-03-02 17:39:18] Production.INFO: count ==3004 [2025-03-02 17:39:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:39:06 - End Time 2025-03-02 17:39:06 [2025-03-02 17:39:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:39:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592705', 'tblTempUsageDetail_20' ) start [2025-03-02 17:39:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592705', 'tblTempUsageDetail_20' ) end [2025-03-02 17:39:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592705', 'tblTempVendorCDR_20' ) start [2025-03-02 17:39:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592705', 'tblTempVendorCDR_20' ) end [2025-03-02 17:39:19] Production.INFO: ProcessCDR(1,14592705,1,1,2) [2025-03-02 17:39:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592705,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:39:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592705,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:39:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592705,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:39:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592705,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:39:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592705', 'tblTempUsageDetail_20' ) start [2025-03-02 17:39:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592705', 'tblTempUsageDetail_20' ) end [2025-03-02 17:39:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:39:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:39:24] Production.INFO: ==14541== Releasing lock... [2025-03-02 17:39:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:39:24] Production.INFO: 51.5 MB #Memory Used# [2025-03-02 17:40:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:40:06 [end_date_ymd] => 2025-03-02 17:40:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:40:06' and `end` < '2025-03-02 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-03-02 17:40:18] Production.INFO: count ==2926 [2025-03-02 17:40:20] Production.ERROR: pbx CDR StartTime 2025-03-02 14:40:06 - End Time 2025-03-02 17:40:06 [2025-03-02 17:40:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:40:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592711', 'tblTempUsageDetail_20' ) start [2025-03-02 17:40:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592711', 'tblTempUsageDetail_20' ) end [2025-03-02 17:40:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592711', 'tblTempVendorCDR_20' ) start [2025-03-02 17:40:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592711', 'tblTempVendorCDR_20' ) end [2025-03-02 17:40:20] Production.INFO: ProcessCDR(1,14592711,1,1,2) [2025-03-02 17:40:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592711,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:40:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592711,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:40:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592711,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:40:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592711,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:40:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592711', 'tblTempUsageDetail_20' ) start [2025-03-02 17:40:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592711', 'tblTempUsageDetail_20' ) end [2025-03-02 17:40:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:40:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:40:24] Production.INFO: ==14670== Releasing lock... [2025-03-02 17:40:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:40:24] Production.INFO: 50 MB #Memory Used# [2025-03-02 17:41:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:41:06 [end_date_ymd] => 2025-03-02 17:41:06 [RateCDR] => 1 ) [2025-03-02 17: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-03-02 14:41:06' and `end` < '2025-03-02 17: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-03-02 17:41:18] Production.INFO: count ==2819 [2025-03-02 17:41:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:41:06 - End Time 2025-03-02 17:41:06 [2025-03-02 17:41:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:41:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592716', 'tblTempUsageDetail_20' ) start [2025-03-02 17:41:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592716', 'tblTempUsageDetail_20' ) end [2025-03-02 17:41:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592716', 'tblTempVendorCDR_20' ) start [2025-03-02 17:41:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592716', 'tblTempVendorCDR_20' ) end [2025-03-02 17:41:19] Production.INFO: ProcessCDR(1,14592716,1,1,2) [2025-03-02 17:41:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592716,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:41:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592716,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:41:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592716,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:41:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592716,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:41:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592716', 'tblTempUsageDetail_20' ) start [2025-03-02 17:41:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592716', 'tblTempUsageDetail_20' ) end [2025-03-02 17:41:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:41:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:41:24] Production.INFO: ==14788== Releasing lock... [2025-03-02 17:41:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:41:24] Production.INFO: 49.25 MB #Memory Used# [2025-03-02 17:42:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:42:05 [end_date_ymd] => 2025-03-02 17:42:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:42:05' and `end` < '2025-03-02 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-03-02 17:42:17] Production.INFO: count ==2800 [2025-03-02 17:42:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:42:05 - End Time 2025-03-02 17:42:05 [2025-03-02 17:42:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:42:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592721', 'tblTempUsageDetail_20' ) start [2025-03-02 17:42:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592721', 'tblTempUsageDetail_20' ) end [2025-03-02 17:42:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592721', 'tblTempVendorCDR_20' ) start [2025-03-02 17:42:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592721', 'tblTempVendorCDR_20' ) end [2025-03-02 17:42:19] Production.INFO: ProcessCDR(1,14592721,1,1,2) [2025-03-02 17:42:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592721,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:42:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592721,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:42:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592721,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:42:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592721,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:42:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592721', 'tblTempUsageDetail_20' ) start [2025-03-02 17:42:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592721', 'tblTempUsageDetail_20' ) end [2025-03-02 17:42:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:42:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:42:23] Production.INFO: ==14903== Releasing lock... [2025-03-02 17:42:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:42:23] Production.INFO: 49.25 MB #Memory Used# [2025-03-02 17:43:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:43:05 [end_date_ymd] => 2025-03-02 17:43:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:43:05' and `end` < '2025-03-02 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-03-02 17:43:17] Production.INFO: count ==2799 [2025-03-02 17:43:18] Production.ERROR: pbx CDR StartTime 2025-03-02 14:43:05 - End Time 2025-03-02 17:43:05 [2025-03-02 17:43:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:43:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592726', 'tblTempUsageDetail_20' ) start [2025-03-02 17:43:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592726', 'tblTempUsageDetail_20' ) end [2025-03-02 17:43:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592726', 'tblTempVendorCDR_20' ) start [2025-03-02 17:43:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592726', 'tblTempVendorCDR_20' ) end [2025-03-02 17:43:19] Production.INFO: ProcessCDR(1,14592726,1,1,2) [2025-03-02 17:43:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592726,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:43:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592726,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:43:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592726,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:43:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592726,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:43:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592726', 'tblTempUsageDetail_20' ) start [2025-03-02 17:43:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592726', 'tblTempUsageDetail_20' ) end [2025-03-02 17:43:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:43:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:43:22] Production.INFO: ==15028== Releasing lock... [2025-03-02 17:43:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:43:22] Production.INFO: 49.75 MB #Memory Used# [2025-03-02 17:44:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:44:05 [end_date_ymd] => 2025-03-02 17:44:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:44:05' and `end` < '2025-03-02 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-03-02 17:44:17] Production.INFO: count ==2793 [2025-03-02 17:44:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:44:05 - End Time 2025-03-02 17:44:05 [2025-03-02 17:44:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:44:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592731', 'tblTempUsageDetail_20' ) start [2025-03-02 17:44:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592731', 'tblTempUsageDetail_20' ) end [2025-03-02 17:44:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592731', 'tblTempVendorCDR_20' ) start [2025-03-02 17:44:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592731', 'tblTempVendorCDR_20' ) end [2025-03-02 17:44:19] Production.INFO: ProcessCDR(1,14592731,1,1,2) [2025-03-02 17:44:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592731,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:44:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592731,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:44:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592731,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:44:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592731,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:44:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592731', 'tblTempUsageDetail_20' ) start [2025-03-02 17:44:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592731', 'tblTempUsageDetail_20' ) end [2025-03-02 17:44:22] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:44:22] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:44:22] Production.INFO: ==15134== Releasing lock... [2025-03-02 17:44:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:44:22] Production.INFO: 48.75 MB #Memory Used# [2025-03-02 17:45:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:45:05 [end_date_ymd] => 2025-03-02 17:45:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:45:05' and `end` < '2025-03-02 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-03-02 17:45:17] Production.INFO: count ==2791 [2025-03-02 17:45:18] Production.ERROR: pbx CDR StartTime 2025-03-02 14:45:05 - End Time 2025-03-02 17:45:05 [2025-03-02 17:45:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:45:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592736', 'tblTempUsageDetail_20' ) start [2025-03-02 17:45:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592736', 'tblTempUsageDetail_20' ) end [2025-03-02 17:45:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592736', 'tblTempVendorCDR_20' ) start [2025-03-02 17:45:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592736', 'tblTempVendorCDR_20' ) end [2025-03-02 17:45:19] Production.INFO: ProcessCDR(1,14592736,1,1,2) [2025-03-02 17:45:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592736,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:45:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592736,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:45:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592736,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:45:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592736,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:45:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592736', 'tblTempUsageDetail_20' ) start [2025-03-02 17:45:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592736', 'tblTempUsageDetail_20' ) end [2025-03-02 17:45:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:45:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:45:24] Production.INFO: ==15259== Releasing lock... [2025-03-02 17:45:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:45:24] Production.INFO: 48.75 MB #Memory Used# [2025-03-02 17:46:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:46:05 [end_date_ymd] => 2025-03-02 17:46:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:46:05' and `end` < '2025-03-02 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-03-02 17:46:17] Production.INFO: count ==2789 [2025-03-02 17:46:18] Production.ERROR: pbx CDR StartTime 2025-03-02 14:46:05 - End Time 2025-03-02 17:46:05 [2025-03-02 17:46:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592741', 'tblTempUsageDetail_20' ) start [2025-03-02 17:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592741', 'tblTempUsageDetail_20' ) end [2025-03-02 17:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592741', 'tblTempVendorCDR_20' ) start [2025-03-02 17:46:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592741', 'tblTempVendorCDR_20' ) end [2025-03-02 17:46:18] Production.INFO: ProcessCDR(1,14592741,1,1,2) [2025-03-02 17:46:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592741,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:46:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592741,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:46:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592741,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:46:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592741,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:46:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592741', 'tblTempUsageDetail_20' ) start [2025-03-02 17:46:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592741', 'tblTempUsageDetail_20' ) end [2025-03-02 17:46:23] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:46:23] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:46:23] Production.INFO: ==15375== Releasing lock... [2025-03-02 17:46:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:46:23] Production.INFO: 49.25 MB #Memory Used# [2025-03-02 17:47:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:47:06 [end_date_ymd] => 2025-03-02 17:47:06 [RateCDR] => 1 ) [2025-03-02 17: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-03-02 14:47:06' and `end` < '2025-03-02 17: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-03-02 17:47:18] Production.INFO: count ==2790 [2025-03-02 17:47:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:47:06 - End Time 2025-03-02 17:47:06 [2025-03-02 17:47:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:47:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592746', 'tblTempUsageDetail_20' ) start [2025-03-02 17:47:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592746', 'tblTempUsageDetail_20' ) end [2025-03-02 17:47:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592746', 'tblTempVendorCDR_20' ) start [2025-03-02 17:47:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592746', 'tblTempVendorCDR_20' ) end [2025-03-02 17:47:19] Production.INFO: ProcessCDR(1,14592746,1,1,2) [2025-03-02 17:47:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592746,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:47:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592746,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:47:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592746,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:47:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592746,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:47:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592746', 'tblTempUsageDetail_20' ) start [2025-03-02 17:47:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592746', 'tblTempUsageDetail_20' ) end [2025-03-02 17:47:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:47:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:47:24] Production.INFO: ==15485== Releasing lock... [2025-03-02 17:47:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:47:24] Production.INFO: 49 MB #Memory Used# [2025-03-02 17:48:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:48:06 [end_date_ymd] => 2025-03-02 17:48:06 [RateCDR] => 1 ) [2025-03-02 17: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-03-02 14:48:06' and `end` < '2025-03-02 17: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-03-02 17:48:18] Production.INFO: count ==2791 [2025-03-02 17:48:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:48:06 - End Time 2025-03-02 17:48:06 [2025-03-02 17:48:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:48:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592751', 'tblTempUsageDetail_20' ) start [2025-03-02 17:48:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592751', 'tblTempUsageDetail_20' ) end [2025-03-02 17:48:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592751', 'tblTempVendorCDR_20' ) start [2025-03-02 17:48:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592751', 'tblTempVendorCDR_20' ) end [2025-03-02 17:48:20] Production.INFO: ProcessCDR(1,14592751,1,1,2) [2025-03-02 17:48:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592751,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:48:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592751,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:48:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592751,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:48:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592751,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:48:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592751', 'tblTempUsageDetail_20' ) start [2025-03-02 17:48:25] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592751', 'tblTempUsageDetail_20' ) end [2025-03-02 17:48:25] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:48:25] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:48:25] Production.INFO: ==15595== Releasing lock... [2025-03-02 17:48:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:48:25] Production.INFO: 49.25 MB #Memory Used# [2025-03-02 17:49:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:49:05 [end_date_ymd] => 2025-03-02 17:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:49:05' and `end` < '2025-03-02 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-03-02 17:49:17] Production.INFO: count ==2733 [2025-03-02 17:49:19] Production.ERROR: pbx CDR StartTime 2025-03-02 14:49:05 - End Time 2025-03-02 17:49:05 [2025-03-02 17:49:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:49:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592756', 'tblTempUsageDetail_20' ) start [2025-03-02 17:49:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592756', 'tblTempUsageDetail_20' ) end [2025-03-02 17:49:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592756', 'tblTempVendorCDR_20' ) start [2025-03-02 17:49:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592756', 'tblTempVendorCDR_20' ) end [2025-03-02 17:49:19] Production.INFO: ProcessCDR(1,14592756,1,1,2) [2025-03-02 17:49:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592756,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:49:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592756,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:49:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592756,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:49:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592756,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:49:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592756', 'tblTempUsageDetail_20' ) start [2025-03-02 17:49:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592756', 'tblTempUsageDetail_20' ) end [2025-03-02 17:49:24] Production.ERROR: pbx prc_insertCDR start [2025-03-02 17:49:24] Production.ERROR: pbx prc_insertCDR end [2025-03-02 17:49:24] Production.INFO: ==15705== Releasing lock... [2025-03-02 17:49:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:49:24] Production.INFO: 48.5 MB #Memory Used# [2025-03-02 17:50:06] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:50:06 [end_date_ymd] => 2025-03-02 17:50:06 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:50:06' and `end` < '2025-03-02 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-03-02 17:50:19] Production.INFO: count ==2651 [2025-03-02 17:50:20] Production.ERROR: pbx CDR StartTime 2025-03-02 14:50:06 - End Time 2025-03-02 17:50:06 [2025-03-02 17:50:20] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:50:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592762', 'tblTempUsageDetail_20' ) start [2025-03-02 17:50:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592762', 'tblTempUsageDetail_20' ) end [2025-03-02 17:50:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592762', 'tblTempVendorCDR_20' ) start [2025-03-02 17:50:20] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592762', 'tblTempVendorCDR_20' ) end [2025-03-02 17:50:20] Production.INFO: ProcessCDR(1,14592762,1,1,2) [2025-03-02 17:50:20] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592762,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:50:22] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592762,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:50:22] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592762,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:50:24] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592762,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:50:24] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592762', 'tblTempUsageDetail_20' ) start [2025-03-02 17:50:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592762', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 17:50:26] Production.ERROR: **Email Sent Status 1 [2025-03-02 17:50:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 17:50:26] Production.INFO: ==15819== Releasing lock... [2025-03-02 17:50:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:50:26] Production.INFO: 48.75 MB #Memory Used# [2025-03-02 17:51:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:51:05 [end_date_ymd] => 2025-03-02 17:51:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:51:05' and `end` < '2025-03-02 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-03-02 17:51:18] Production.INFO: count ==2609 [2025-03-02 17:51:18] Production.ERROR: pbx CDR StartTime 2025-03-02 14:51:05 - End Time 2025-03-02 17:51:05 [2025-03-02 17:51:19] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:51:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592767', 'tblTempUsageDetail_20' ) start [2025-03-02 17:51:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592767', 'tblTempUsageDetail_20' ) end [2025-03-02 17:51:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592767', 'tblTempVendorCDR_20' ) start [2025-03-02 17:51:19] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592767', 'tblTempVendorCDR_20' ) end [2025-03-02 17:51:19] Production.INFO: ProcessCDR(1,14592767,1,1,2) [2025-03-02 17:51:19] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592767,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:51:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592767,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:51:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592767,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:51:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592767,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:51:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592767', 'tblTempUsageDetail_20' ) start [2025-03-02 17:51:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592767', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 17:51:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 17:51:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 17:51:24] Production.INFO: ==15935== Releasing lock... [2025-03-02 17:51:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:51:24] Production.INFO: 48.25 MB #Memory Used# [2025-03-02 17:52:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:52:04 [end_date_ymd] => 2025-03-02 17:52:04 [RateCDR] => 1 ) [2025-03-02 17:52: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-03-02 14:52:04' and `end` < '2025-03-02 17:52: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-03-02 17:52:17] Production.INFO: count ==2525 [2025-03-02 17:52:18] Production.ERROR: pbx CDR StartTime 2025-03-02 14:52:04 - End Time 2025-03-02 17:52:04 [2025-03-02 17:52:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592772', 'tblTempUsageDetail_20' ) start [2025-03-02 17:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592772', 'tblTempUsageDetail_20' ) end [2025-03-02 17:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592772', 'tblTempVendorCDR_20' ) start [2025-03-02 17:52:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592772', 'tblTempVendorCDR_20' ) end [2025-03-02 17:52:18] Production.INFO: ProcessCDR(1,14592772,1,1,2) [2025-03-02 17:52:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592772,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:52:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592772,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:52:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592772,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:52:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592772,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:52:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592772', 'tblTempUsageDetail_20' ) start [2025-03-02 17:52:22] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592772', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 17:52:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 17:52:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 17:52:23] Production.INFO: ==16051== Releasing lock... [2025-03-02 17:52:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:52:23] Production.INFO: 47.75 MB #Memory Used# [2025-03-02 17:53:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:53:04 [end_date_ymd] => 2025-03-02 17:53:04 [RateCDR] => 1 ) [2025-03-02 17: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-03-02 14:53:04' and `end` < '2025-03-02 17: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-03-02 17:53:16] Production.INFO: count ==2446 [2025-03-02 17:53:17] Production.ERROR: pbx CDR StartTime 2025-03-02 14:53:04 - End Time 2025-03-02 17:53:04 [2025-03-02 17:53:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592777', 'tblTempUsageDetail_20' ) start [2025-03-02 17:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592777', 'tblTempUsageDetail_20' ) end [2025-03-02 17:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592777', 'tblTempVendorCDR_20' ) start [2025-03-02 17:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592777', 'tblTempVendorCDR_20' ) end [2025-03-02 17:53:17] Production.INFO: ProcessCDR(1,14592777,1,1,2) [2025-03-02 17:53:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592777,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:53:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592777,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:53:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592777,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:53:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592777,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:53:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592777', 'tblTempUsageDetail_20' ) start [2025-03-02 17:53:22] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592777', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 17:53:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 17:53:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 17:53:23] Production.INFO: ==16160== Releasing lock... [2025-03-02 17:53:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:53:23] Production.INFO: 47 MB #Memory Used# [2025-03-02 17:54:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:54:04 [end_date_ymd] => 2025-03-02 17:54:04 [RateCDR] => 1 ) [2025-03-02 17:54: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-03-02 14:54:04' and `end` < '2025-03-02 17:54: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-03-02 17:54:17] Production.INFO: count ==2366 [2025-03-02 17:54:17] Production.ERROR: pbx CDR StartTime 2025-03-02 14:54:04 - End Time 2025-03-02 17:54:04 [2025-03-02 17:54:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592782', 'tblTempUsageDetail_20' ) start [2025-03-02 17:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592782', 'tblTempUsageDetail_20' ) end [2025-03-02 17:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592782', 'tblTempVendorCDR_20' ) start [2025-03-02 17:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592782', 'tblTempVendorCDR_20' ) end [2025-03-02 17:54:17] Production.INFO: ProcessCDR(1,14592782,1,1,2) [2025-03-02 17:54:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592782,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:54:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592782,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:54:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592782,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:54:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592782,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:54:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592782', 'tblTempUsageDetail_20' ) start [2025-03-02 17:54:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592782', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 17:54:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 17:54:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 17:54:24] Production.INFO: ==16276== Releasing lock... [2025-03-02 17:54:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:54:24] Production.INFO: 46.5 MB #Memory Used# [2025-03-02 17:55:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:55:04 [end_date_ymd] => 2025-03-02 17:55:04 [RateCDR] => 1 ) [2025-03-02 17:55: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-03-02 14:55:04' and `end` < '2025-03-02 17:55: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-03-02 17:55:16] Production.INFO: count ==2285 [2025-03-02 17:55:17] Production.ERROR: pbx CDR StartTime 2025-03-02 14:55:04 - End Time 2025-03-02 17:55:04 [2025-03-02 17:55:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592787', 'tblTempUsageDetail_20' ) start [2025-03-02 17:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592787', 'tblTempUsageDetail_20' ) end [2025-03-02 17:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592787', 'tblTempVendorCDR_20' ) start [2025-03-02 17:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592787', 'tblTempVendorCDR_20' ) end [2025-03-02 17:55:17] Production.INFO: ProcessCDR(1,14592787,1,1,2) [2025-03-02 17:55:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592787,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:55:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592787,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:55:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592787,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:55:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592787,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592787', 'tblTempUsageDetail_20' ) start [2025-03-02 17:55:22] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592787', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 17:55:22] Production.ERROR: **Email Sent Status 1 [2025-03-02 17:55:22] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 17:55:22] Production.INFO: ==16445== Releasing lock... [2025-03-02 17:55:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:55:22] Production.INFO: 45.75 MB #Memory Used# [2025-03-02 17:56:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:56:04 [end_date_ymd] => 2025-03-02 17:56:04 [RateCDR] => 1 ) [2025-03-02 17:56: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-03-02 14:56:04' and `end` < '2025-03-02 17:56: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-03-02 17:56:16] Production.INFO: count ==2205 [2025-03-02 17:56:17] Production.ERROR: pbx CDR StartTime 2025-03-02 14:56:04 - End Time 2025-03-02 17:56:04 [2025-03-02 17:56:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592792', 'tblTempUsageDetail_20' ) start [2025-03-02 17:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592792', 'tblTempUsageDetail_20' ) end [2025-03-02 17:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592792', 'tblTempVendorCDR_20' ) start [2025-03-02 17:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592792', 'tblTempVendorCDR_20' ) end [2025-03-02 17:56:17] Production.INFO: ProcessCDR(1,14592792,1,1,2) [2025-03-02 17:56:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592792,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:56:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592792,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:56:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592792,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:56:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592792,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:56:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592792', 'tblTempUsageDetail_20' ) start [2025-03-02 17:56:22] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592792', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 17:56:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 17:56:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 17:56:23] Production.INFO: ==16564== Releasing lock... [2025-03-02 17:56:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:56:23] Production.INFO: 45 MB #Memory Used# [2025-03-02 17:57:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:57:04 [end_date_ymd] => 2025-03-02 17:57:04 [RateCDR] => 1 ) [2025-03-02 17:57: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-03-02 14:57:04' and `end` < '2025-03-02 17:57: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-03-02 17:57:16] Production.INFO: count ==2179 [2025-03-02 17:57:17] Production.ERROR: pbx CDR StartTime 2025-03-02 14:57:04 - End Time 2025-03-02 17:57:04 [2025-03-02 17:57:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592797', 'tblTempUsageDetail_20' ) start [2025-03-02 17:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592797', 'tblTempUsageDetail_20' ) end [2025-03-02 17:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592797', 'tblTempVendorCDR_20' ) start [2025-03-02 17:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592797', 'tblTempVendorCDR_20' ) end [2025-03-02 17:57:17] Production.INFO: ProcessCDR(1,14592797,1,1,2) [2025-03-02 17:57:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592797,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:57:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592797,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:57:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592797,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:57:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592797,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:57:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592797', 'tblTempUsageDetail_20' ) start [2025-03-02 17:57:22] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592797', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 17:57:22] Production.ERROR: **Email Sent Status 1 [2025-03-02 17:57:22] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 17:57:22] Production.INFO: ==16684== Releasing lock... [2025-03-02 17:57:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:57:22] Production.INFO: 45 MB #Memory Used# [2025-03-02 17:58:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:58:04 [end_date_ymd] => 2025-03-02 17:58:04 [RateCDR] => 1 ) [2025-03-02 17: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-03-02 14:58:04' and `end` < '2025-03-02 17: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-03-02 17:58:17] Production.INFO: count ==2184 [2025-03-02 17:58:17] Production.ERROR: pbx CDR StartTime 2025-03-02 14:58:04 - End Time 2025-03-02 17:58:04 [2025-03-02 17:58:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592802', 'tblTempUsageDetail_20' ) start [2025-03-02 17:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592802', 'tblTempUsageDetail_20' ) end [2025-03-02 17:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592802', 'tblTempVendorCDR_20' ) start [2025-03-02 17:58:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592802', 'tblTempVendorCDR_20' ) end [2025-03-02 17:58:18] Production.INFO: ProcessCDR(1,14592802,1,1,2) [2025-03-02 17:58:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592802,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:58:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592802,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:58:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592802,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:58:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592802,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:58:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592802', 'tblTempUsageDetail_20' ) start [2025-03-02 17:58:22] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592802', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 17:58:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 17:58:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 17:58:23] Production.INFO: ==16796== Releasing lock... [2025-03-02 17:58:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:58:23] Production.INFO: 44.75 MB #Memory Used# [2025-03-02 17:59:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 14:59:05 [end_date_ymd] => 2025-03-02 17:59:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 14:59:05' and `end` < '2025-03-02 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-03-02 17:59:17] Production.INFO: count ==2179 [2025-03-02 17:59:18] Production.ERROR: pbx CDR StartTime 2025-03-02 14:59:05 - End Time 2025-03-02 17:59:05 [2025-03-02 17:59:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 17:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592807', 'tblTempUsageDetail_20' ) start [2025-03-02 17:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592807', 'tblTempUsageDetail_20' ) end [2025-03-02 17:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592807', 'tblTempVendorCDR_20' ) start [2025-03-02 17:59:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592807', 'tblTempVendorCDR_20' ) end [2025-03-02 17:59:18] Production.INFO: ProcessCDR(1,14592807,1,1,2) [2025-03-02 17:59:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592807,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:59:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592807,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 17:59:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592807,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:59:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592807,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 17:59:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592807', 'tblTempUsageDetail_20' ) start [2025-03-02 17:59:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592807', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 17:59:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 17:59:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 17:59:24] Production.INFO: ==16914== Releasing lock... [2025-03-02 17:59:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 17:59:24] Production.INFO: 44.75 MB #Memory Used# [2025-03-02 18:00:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:00:04 [end_date_ymd] => 2025-03-02 18:00:04 [RateCDR] => 1 ) [2025-03-02 18:00: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-03-02 15:00:04' and `end` < '2025-03-02 18:00: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-03-02 18:00:17] Production.INFO: count ==2179 [2025-03-02 18:00:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:00:04 - End Time 2025-03-02 18:00:04 [2025-03-02 18:00:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592813', 'tblTempUsageDetail_20' ) start [2025-03-02 18:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592813', 'tblTempUsageDetail_20' ) end [2025-03-02 18:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592813', 'tblTempVendorCDR_20' ) start [2025-03-02 18:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592813', 'tblTempVendorCDR_20' ) end [2025-03-02 18:00:18] Production.INFO: ProcessCDR(1,14592813,1,1,2) [2025-03-02 18:00:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592813,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:00:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592813,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:00:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592813,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:00:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592813,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:00:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592813', 'tblTempUsageDetail_20' ) start [2025-03-02 18:00:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592813', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:00:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:00:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:00:24] Production.INFO: ==17038== Releasing lock... [2025-03-02 18:00:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:00:24] Production.INFO: 44.75 MB #Memory Used# [2025-03-02 18:01:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:01:05 [end_date_ymd] => 2025-03-02 18:01:05 [RateCDR] => 1 ) [2025-03-02 18: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-03-02 15:01:05' and `end` < '2025-03-02 18: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-03-02 18:01:17] Production.INFO: count ==2226 [2025-03-02 18:01:18] Production.ERROR: pbx CDR StartTime 2025-03-02 15:01:05 - End Time 2025-03-02 18:01:05 [2025-03-02 18:01:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592818', 'tblTempUsageDetail_20' ) start [2025-03-02 18:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592818', 'tblTempUsageDetail_20' ) end [2025-03-02 18:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592818', 'tblTempVendorCDR_20' ) start [2025-03-02 18:01:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592818', 'tblTempVendorCDR_20' ) end [2025-03-02 18:01:18] Production.INFO: ProcessCDR(1,14592818,1,1,2) [2025-03-02 18:01:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592818,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:01:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592818,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:01:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592818,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:01:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592818,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:01:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592818', 'tblTempUsageDetail_20' ) start [2025-03-02 18:01:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592818', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:01:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:01:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:01:24] Production.INFO: ==17165== Releasing lock... [2025-03-02 18:01:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:01:24] Production.INFO: 45 MB #Memory Used# [2025-03-02 18:02:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:02:04 [end_date_ymd] => 2025-03-02 18:02:04 [RateCDR] => 1 ) [2025-03-02 18:02: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-03-02 15:02:04' and `end` < '2025-03-02 18:02: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-03-02 18:02:16] Production.INFO: count ==2230 [2025-03-02 18:02:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:02:04 - End Time 2025-03-02 18:02:04 [2025-03-02 18:02:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592823', 'tblTempUsageDetail_20' ) start [2025-03-02 18:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592823', 'tblTempUsageDetail_20' ) end [2025-03-02 18:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592823', 'tblTempVendorCDR_20' ) start [2025-03-02 18:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592823', 'tblTempVendorCDR_20' ) end [2025-03-02 18:02:17] Production.INFO: ProcessCDR(1,14592823,1,1,2) [2025-03-02 18:02:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592823,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:02:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592823,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:02:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592823,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:02:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592823,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:02:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592823', 'tblTempUsageDetail_20' ) start [2025-03-02 18:02:22] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592823', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:02:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:02:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:02:23] Production.INFO: ==17272== Releasing lock... [2025-03-02 18:02:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:02:23] Production.INFO: 45.25 MB #Memory Used# [2025-03-02 18:03:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:03:05 [end_date_ymd] => 2025-03-02 18:03:05 [RateCDR] => 1 ) [2025-03-02 18: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-03-02 15:03:05' and `end` < '2025-03-02 18: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-03-02 18:03:17] Production.INFO: count ==2228 [2025-03-02 18:03:18] Production.ERROR: pbx CDR StartTime 2025-03-02 15:03:05 - End Time 2025-03-02 18:03:05 [2025-03-02 18:03:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592828', 'tblTempUsageDetail_20' ) start [2025-03-02 18:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592828', 'tblTempUsageDetail_20' ) end [2025-03-02 18:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592828', 'tblTempVendorCDR_20' ) start [2025-03-02 18:03:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592828', 'tblTempVendorCDR_20' ) end [2025-03-02 18:03:18] Production.INFO: ProcessCDR(1,14592828,1,1,2) [2025-03-02 18:03:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592828,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:03:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592828,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:03:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592828,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:03:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592828,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:03:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592828', 'tblTempUsageDetail_20' ) start [2025-03-02 18:03:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592828', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:03:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:03:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:03:24] Production.INFO: ==17398== Releasing lock... [2025-03-02 18:03:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:03:24] Production.INFO: 45.25 MB #Memory Used# [2025-03-02 18:04:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:04:04 [end_date_ymd] => 2025-03-02 18:04:04 [RateCDR] => 1 ) [2025-03-02 18:04: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-03-02 15:04:04' and `end` < '2025-03-02 18:04: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-03-02 18:04:17] Production.INFO: count ==2231 [2025-03-02 18:04:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:04:04 - End Time 2025-03-02 18:04:04 [2025-03-02 18:04:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592833', 'tblTempUsageDetail_20' ) start [2025-03-02 18:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592833', 'tblTempUsageDetail_20' ) end [2025-03-02 18:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592833', 'tblTempVendorCDR_20' ) start [2025-03-02 18:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592833', 'tblTempVendorCDR_20' ) end [2025-03-02 18:04:17] Production.INFO: ProcessCDR(1,14592833,1,1,2) [2025-03-02 18:04:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592833,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:04:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592833,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:04:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592833,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:04:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592833,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:04:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592833', 'tblTempUsageDetail_20' ) start [2025-03-02 18:04:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592833', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:04:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:04:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:04:24] Production.INFO: ==17509== Releasing lock... [2025-03-02 18:04:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:04:24] Production.INFO: 45 MB #Memory Used# [2025-03-02 18:05:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:05:04 [end_date_ymd] => 2025-03-02 18:05:04 [RateCDR] => 1 ) [2025-03-02 18:05: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-03-02 15:05:04' and `end` < '2025-03-02 18: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-03-02 18:05:16] Production.INFO: count ==2233 [2025-03-02 18:05:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:05:04 - End Time 2025-03-02 18:05:04 [2025-03-02 18:05:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592838', 'tblTempUsageDetail_20' ) start [2025-03-02 18:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592838', 'tblTempUsageDetail_20' ) end [2025-03-02 18:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592838', 'tblTempVendorCDR_20' ) start [2025-03-02 18:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592838', 'tblTempVendorCDR_20' ) end [2025-03-02 18:05:17] Production.INFO: ProcessCDR(1,14592838,1,1,2) [2025-03-02 18:05:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592838,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:05:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592838,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:05:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592838,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:05:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592838,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:05:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592838', 'tblTempUsageDetail_20' ) start [2025-03-02 18:05:22] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592838', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:05:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:05:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:05:23] Production.INFO: ==17614== Releasing lock... [2025-03-02 18:05:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:05:23] Production.INFO: 45 MB #Memory Used# [2025-03-02 18:06:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:06:04 [end_date_ymd] => 2025-03-02 18:06:04 [RateCDR] => 1 ) [2025-03-02 18: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-03-02 15:06:04' and `end` < '2025-03-02 18: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-03-02 18:06:16] Production.INFO: count ==2230 [2025-03-02 18:06:16] Production.ERROR: pbx CDR StartTime 2025-03-02 15:06:04 - End Time 2025-03-02 18:06:04 [2025-03-02 18:06:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592841', 'tblTempUsageDetail_20' ) start [2025-03-02 18:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592841', 'tblTempUsageDetail_20' ) end [2025-03-02 18:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592841', 'tblTempVendorCDR_20' ) start [2025-03-02 18:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592841', 'tblTempVendorCDR_20' ) end [2025-03-02 18:06:17] Production.INFO: ProcessCDR(1,14592841,1,1,2) [2025-03-02 18:06:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592841,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:06:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592841,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:06:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592841,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:06:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592841,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:06:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592841', 'tblTempUsageDetail_20' ) start [2025-03-02 18:06:22] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592841', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:06:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:06:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:06:23] Production.INFO: ==17729== Releasing lock... [2025-03-02 18:06:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:06:23] Production.INFO: 45 MB #Memory Used# [2025-03-02 18:07:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:07:05 [end_date_ymd] => 2025-03-02 18:07:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 15:07:05' and `end` < '2025-03-02 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-03-02 18:07:17] Production.INFO: count ==2234 [2025-03-02 18:07:18] Production.ERROR: pbx CDR StartTime 2025-03-02 15:07:05 - End Time 2025-03-02 18:07:05 [2025-03-02 18:07:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592848', 'tblTempUsageDetail_20' ) start [2025-03-02 18:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592848', 'tblTempUsageDetail_20' ) end [2025-03-02 18:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592848', 'tblTempVendorCDR_20' ) start [2025-03-02 18:07:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592848', 'tblTempVendorCDR_20' ) end [2025-03-02 18:07:18] Production.INFO: ProcessCDR(1,14592848,1,1,2) [2025-03-02 18:07:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592848,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:07:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592848,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:07:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592848,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:07:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592848,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:07:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592848', 'tblTempUsageDetail_20' ) start [2025-03-02 18:07:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592848', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:07:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:07:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:07:24] Production.INFO: ==17844== Releasing lock... [2025-03-02 18:07:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:07:24] Production.INFO: 45 MB #Memory Used# [2025-03-02 18:08:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:08:04 [end_date_ymd] => 2025-03-02 18:08:04 [RateCDR] => 1 ) [2025-03-02 18:08: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-03-02 15:08:04' and `end` < '2025-03-02 18:08: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-03-02 18:08:16] Production.INFO: count ==2237 [2025-03-02 18:08:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:08:04 - End Time 2025-03-02 18:08:04 [2025-03-02 18:08:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592853', 'tblTempUsageDetail_20' ) start [2025-03-02 18:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592853', 'tblTempUsageDetail_20' ) end [2025-03-02 18:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592853', 'tblTempVendorCDR_20' ) start [2025-03-02 18:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592853', 'tblTempVendorCDR_20' ) end [2025-03-02 18:08:17] Production.INFO: ProcessCDR(1,14592853,1,1,2) [2025-03-02 18:08:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592853,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:08:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592853,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:08:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592853,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:08:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592853,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:08:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592853', 'tblTempUsageDetail_20' ) start [2025-03-02 18:08:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592853', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:08:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:08:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:08:24] Production.INFO: ==17955== Releasing lock... [2025-03-02 18:08:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:08:24] Production.INFO: 45.25 MB #Memory Used# [2025-03-02 18:09:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:09:04 [end_date_ymd] => 2025-03-02 18:09:04 [RateCDR] => 1 ) [2025-03-02 18:09: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-03-02 15:09:04' and `end` < '2025-03-02 18:09: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-03-02 18:09:16] Production.INFO: count ==2240 [2025-03-02 18:09:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:09:04 - End Time 2025-03-02 18:09:04 [2025-03-02 18:09:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592858', 'tblTempUsageDetail_20' ) start [2025-03-02 18:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592858', 'tblTempUsageDetail_20' ) end [2025-03-02 18:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592858', 'tblTempVendorCDR_20' ) start [2025-03-02 18:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592858', 'tblTempVendorCDR_20' ) end [2025-03-02 18:09:17] Production.INFO: ProcessCDR(1,14592858,1,1,2) [2025-03-02 18:09:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592858,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:09:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592858,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:09:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592858,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:09:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592858,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:09:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592858', 'tblTempUsageDetail_20' ) start [2025-03-02 18:09:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592858', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:09:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:09:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:09:24] Production.INFO: ==18074== Releasing lock... [2025-03-02 18:09:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:09:24] Production.INFO: 45.25 MB #Memory Used# [2025-03-02 18:10:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:10:05 [end_date_ymd] => 2025-03-02 18:10:05 [RateCDR] => 1 ) [2025-03-02 18: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-03-02 15:10:05' and `end` < '2025-03-02 18: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-03-02 18:10:17] Production.INFO: count ==2244 [2025-03-02 18:10:18] Production.ERROR: pbx CDR StartTime 2025-03-02 15:10:05 - End Time 2025-03-02 18:10:05 [2025-03-02 18:10:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592863', 'tblTempUsageDetail_20' ) start [2025-03-02 18:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592863', 'tblTempUsageDetail_20' ) end [2025-03-02 18:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592863', 'tblTempVendorCDR_20' ) start [2025-03-02 18:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592863', 'tblTempVendorCDR_20' ) end [2025-03-02 18:10:18] Production.INFO: ProcessCDR(1,14592863,1,1,2) [2025-03-02 18:10:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592863,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:10:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592863,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:10:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592863,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:10:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592863,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:10:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592863', 'tblTempUsageDetail_20' ) start [2025-03-02 18:10:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592863', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:10:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:10:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:10:25] Production.INFO: ==18225== Releasing lock... [2025-03-02 18:10:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:10:25] Production.INFO: 45.25 MB #Memory Used# [2025-03-02 18:11:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:11:05 [end_date_ymd] => 2025-03-02 18:11:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 15:11:05' and `end` < '2025-03-02 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-03-02 18:11:17] Production.INFO: count ==2298 [2025-03-02 18:11:18] Production.ERROR: pbx CDR StartTime 2025-03-02 15:11:05 - End Time 2025-03-02 18:11:05 [2025-03-02 18:11:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:11:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592869', 'tblTempUsageDetail_20' ) start [2025-03-02 18:11:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592869', 'tblTempUsageDetail_20' ) end [2025-03-02 18:11:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592869', 'tblTempVendorCDR_20' ) start [2025-03-02 18:11:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592869', 'tblTempVendorCDR_20' ) end [2025-03-02 18:11:18] Production.INFO: ProcessCDR(1,14592869,1,1,2) [2025-03-02 18:11:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592869,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:11:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592869,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:11:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592869,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:11:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592869,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:11:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592869', 'tblTempUsageDetail_20' ) start [2025-03-02 18:11:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592869', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:11:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:11:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:11:24] Production.INFO: ==18345== Releasing lock... [2025-03-02 18:11:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:11:24] Production.INFO: 45.5 MB #Memory Used# [2025-03-02 18:12:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:12:04 [end_date_ymd] => 2025-03-02 18:12:04 [RateCDR] => 1 ) [2025-03-02 18:12: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-03-02 15:12:04' and `end` < '2025-03-02 18:12: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-03-02 18:12:17] Production.INFO: count ==2298 [2025-03-02 18:12:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:12:04 - End Time 2025-03-02 18:12:04 [2025-03-02 18:12:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592874', 'tblTempUsageDetail_20' ) start [2025-03-02 18:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592874', 'tblTempUsageDetail_20' ) end [2025-03-02 18:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592874', 'tblTempVendorCDR_20' ) start [2025-03-02 18:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592874', 'tblTempVendorCDR_20' ) end [2025-03-02 18:12:17] Production.INFO: ProcessCDR(1,14592874,1,1,2) [2025-03-02 18:12:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592874,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:12:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592874,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:12:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592874,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:12:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592874,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:12:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592874', 'tblTempUsageDetail_20' ) start [2025-03-02 18:12:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592874', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:12:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:12:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:12:24] Production.INFO: ==18455== Releasing lock... [2025-03-02 18:12:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:12:24] Production.INFO: 45.5 MB #Memory Used# [2025-03-02 18:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:13:05 [end_date_ymd] => 2025-03-02 18:13:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 15:13:05' and `end` < '2025-03-02 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-03-02 18:13:17] Production.INFO: count ==2297 [2025-03-02 18:13:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:13:05 - End Time 2025-03-02 18:13:05 [2025-03-02 18:13:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592879', 'tblTempUsageDetail_20' ) start [2025-03-02 18:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592879', 'tblTempUsageDetail_20' ) end [2025-03-02 18:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592879', 'tblTempVendorCDR_20' ) start [2025-03-02 18:13:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592879', 'tblTempVendorCDR_20' ) end [2025-03-02 18:13:18] Production.INFO: ProcessCDR(1,14592879,1,1,2) [2025-03-02 18:13:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592879,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:13:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592879,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:13:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592879,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:13:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592879,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:13:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592879', 'tblTempUsageDetail_20' ) start [2025-03-02 18:13:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592879', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:13:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:13:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:13:24] Production.INFO: ==18562== Releasing lock... [2025-03-02 18:13:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:13:24] Production.INFO: 45.5 MB #Memory Used# [2025-03-02 18:14:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:14:04 [end_date_ymd] => 2025-03-02 18:14:04 [RateCDR] => 1 ) [2025-03-02 18: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-03-02 15:14:04' and `end` < '2025-03-02 18: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-03-02 18:14:16] Production.INFO: count ==2299 [2025-03-02 18:14:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:14:04 - End Time 2025-03-02 18:14:04 [2025-03-02 18:14:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592884', 'tblTempUsageDetail_20' ) start [2025-03-02 18:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592884', 'tblTempUsageDetail_20' ) end [2025-03-02 18:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592884', 'tblTempVendorCDR_20' ) start [2025-03-02 18:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592884', 'tblTempVendorCDR_20' ) end [2025-03-02 18:14:17] Production.INFO: ProcessCDR(1,14592884,1,1,2) [2025-03-02 18:14:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592884,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:14:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592884,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:14:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592884,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:14:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592884,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:14:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592884', 'tblTempUsageDetail_20' ) start [2025-03-02 18:14:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592884', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:14:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:14:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:14:24] Production.INFO: ==18671== Releasing lock... [2025-03-02 18:14:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:14:24] Production.INFO: 45.5 MB #Memory Used# [2025-03-02 18:15:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:15:04 [end_date_ymd] => 2025-03-02 18:15:04 [RateCDR] => 1 ) [2025-03-02 18: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-03-02 15:15:04' and `end` < '2025-03-02 18: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-03-02 18:15:17] Production.INFO: count ==2304 [2025-03-02 18:15:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:15:04 - End Time 2025-03-02 18:15:04 [2025-03-02 18:15:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592889', 'tblTempUsageDetail_20' ) start [2025-03-02 18:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592889', 'tblTempUsageDetail_20' ) end [2025-03-02 18:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592889', 'tblTempVendorCDR_20' ) start [2025-03-02 18:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592889', 'tblTempVendorCDR_20' ) end [2025-03-02 18:15:17] Production.INFO: ProcessCDR(1,14592889,1,1,2) [2025-03-02 18:15:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592889,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:15:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592889,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:15:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592889,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:15:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592889,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:15:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592889', 'tblTempUsageDetail_20' ) start [2025-03-02 18:15:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592889', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:15:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:15:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:15:24] Production.INFO: ==18787== Releasing lock... [2025-03-02 18:15:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:15:24] Production.INFO: 45.75 MB #Memory Used# [2025-03-02 18:16:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:16:04 [end_date_ymd] => 2025-03-02 18:16:04 [RateCDR] => 1 ) [2025-03-02 18: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-03-02 15:16:04' and `end` < '2025-03-02 18: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-03-02 18:16:16] Production.INFO: count ==2307 [2025-03-02 18:16:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:16:04 - End Time 2025-03-02 18:16:04 [2025-03-02 18:16:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592894', 'tblTempUsageDetail_20' ) start [2025-03-02 18:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592894', 'tblTempUsageDetail_20' ) end [2025-03-02 18:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592894', 'tblTempVendorCDR_20' ) start [2025-03-02 18:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592894', 'tblTempVendorCDR_20' ) end [2025-03-02 18:16:17] Production.INFO: ProcessCDR(1,14592894,1,1,2) [2025-03-02 18:16:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592894,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:16:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592894,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:16:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592894,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:16:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592894,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592894', 'tblTempUsageDetail_20' ) start [2025-03-02 18:16:22] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592894', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:16:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:16:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:16:23] Production.INFO: ==18903== Releasing lock... [2025-03-02 18:16:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:16:23] Production.INFO: 45.75 MB #Memory Used# [2025-03-02 18:17:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:17:04 [end_date_ymd] => 2025-03-02 18:17:04 [RateCDR] => 1 ) [2025-03-02 18: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-03-02 15:17:04' and `end` < '2025-03-02 18: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-03-02 18:17:17] Production.INFO: count ==2312 [2025-03-02 18:17:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:17:04 - End Time 2025-03-02 18:17:04 [2025-03-02 18:17:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592899', 'tblTempUsageDetail_20' ) start [2025-03-02 18:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592899', 'tblTempUsageDetail_20' ) end [2025-03-02 18:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592899', 'tblTempVendorCDR_20' ) start [2025-03-02 18:17:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592899', 'tblTempVendorCDR_20' ) end [2025-03-02 18:17:18] Production.INFO: ProcessCDR(1,14592899,1,1,2) [2025-03-02 18:17:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592899,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:17:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592899,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:17:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592899,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:17:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592899,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:17:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592899', 'tblTempUsageDetail_20' ) start [2025-03-02 18:17:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592899', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:17:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:17:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:17:24] Production.INFO: ==18978== Releasing lock... [2025-03-02 18:17:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:17:24] Production.INFO: 45.75 MB #Memory Used# [2025-03-02 18:18:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:18:04 [end_date_ymd] => 2025-03-02 18:18:04 [RateCDR] => 1 ) [2025-03-02 18:18: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-03-02 15:18:04' and `end` < '2025-03-02 18:18: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-03-02 18:18:16] Production.INFO: count ==2307 [2025-03-02 18:18:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:18:04 - End Time 2025-03-02 18:18:04 [2025-03-02 18:18:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592904', 'tblTempUsageDetail_20' ) start [2025-03-02 18:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592904', 'tblTempUsageDetail_20' ) end [2025-03-02 18:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592904', 'tblTempVendorCDR_20' ) start [2025-03-02 18:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592904', 'tblTempVendorCDR_20' ) end [2025-03-02 18:18:17] Production.INFO: ProcessCDR(1,14592904,1,1,2) [2025-03-02 18:18:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592904,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:18:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592904,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:18:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592904,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:18:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592904,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:18:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592904', 'tblTempUsageDetail_20' ) start [2025-03-02 18:18:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592904', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:18:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:18:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:18:23] Production.INFO: ==19048== Releasing lock... [2025-03-02 18:18:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:18:23] Production.INFO: 45.75 MB #Memory Used# [2025-03-02 18:19:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:19:05 [end_date_ymd] => 2025-03-02 18:19:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 15:19:05' and `end` < '2025-03-02 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-03-02 18:19:17] Production.INFO: count ==2306 [2025-03-02 18:19:18] Production.ERROR: pbx CDR StartTime 2025-03-02 15:19:05 - End Time 2025-03-02 18:19:05 [2025-03-02 18:19:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592909', 'tblTempUsageDetail_20' ) start [2025-03-02 18:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592909', 'tblTempUsageDetail_20' ) end [2025-03-02 18:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592909', 'tblTempVendorCDR_20' ) start [2025-03-02 18:19:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592909', 'tblTempVendorCDR_20' ) end [2025-03-02 18:19:18] Production.INFO: ProcessCDR(1,14592909,1,1,2) [2025-03-02 18:19:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592909,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:19:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592909,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:19:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592909,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:19:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592909,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:19:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592909', 'tblTempUsageDetail_20' ) start [2025-03-02 18:19:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592909', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:19:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:19:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:19:24] Production.INFO: ==19125== Releasing lock... [2025-03-02 18:19:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:19:24] Production.INFO: 45.75 MB #Memory Used# [2025-03-02 18:20:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:20:04 [end_date_ymd] => 2025-03-02 18:20:04 [RateCDR] => 1 ) [2025-03-02 18:20: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-03-02 15:20:04' and `end` < '2025-03-02 18:20: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-03-02 18:20:16] Production.INFO: count ==2311 [2025-03-02 18:20:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:20:04 - End Time 2025-03-02 18:20:04 [2025-03-02 18:20:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592915', 'tblTempUsageDetail_20' ) start [2025-03-02 18:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592915', 'tblTempUsageDetail_20' ) end [2025-03-02 18:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592915', 'tblTempVendorCDR_20' ) start [2025-03-02 18:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592915', 'tblTempVendorCDR_20' ) end [2025-03-02 18:20:17] Production.INFO: ProcessCDR(1,14592915,1,1,2) [2025-03-02 18:20:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592915,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:20:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592915,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:20:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592915,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:20:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592915,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592915', 'tblTempUsageDetail_20' ) start [2025-03-02 18:20:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592915', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:20:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:20:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:20:24] Production.INFO: ==19196== Releasing lock... [2025-03-02 18:20:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:20:24] Production.INFO: 45.75 MB #Memory Used# [2025-03-02 18:21:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:21:04 [end_date_ymd] => 2025-03-02 18:21:04 [RateCDR] => 1 ) [2025-03-02 18:21: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-03-02 15:21:04' and `end` < '2025-03-02 18:21: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-03-02 18:21:16] Production.INFO: count ==2301 [2025-03-02 18:21:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:21:04 - End Time 2025-03-02 18:21:04 [2025-03-02 18:21:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592920', 'tblTempUsageDetail_20' ) start [2025-03-02 18:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592920', 'tblTempUsageDetail_20' ) end [2025-03-02 18:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592920', 'tblTempVendorCDR_20' ) start [2025-03-02 18:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592920', 'tblTempVendorCDR_20' ) end [2025-03-02 18:21:17] Production.INFO: ProcessCDR(1,14592920,1,1,2) [2025-03-02 18:21:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592920,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:21:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592920,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:21:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592920,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:21:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592920,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:21:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592920', 'tblTempUsageDetail_20' ) start [2025-03-02 18:21:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592920', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:21:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:21:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:21:24] Production.INFO: ==19269== Releasing lock... [2025-03-02 18:21:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:21:24] Production.INFO: 45.5 MB #Memory Used# [2025-03-02 18:22:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:22:05 [end_date_ymd] => 2025-03-02 18:22:05 [RateCDR] => 1 ) [2025-03-02 18: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-03-02 15:22:05' and `end` < '2025-03-02 18: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-03-02 18:22:17] Production.INFO: count ==2288 [2025-03-02 18:22:18] Production.ERROR: pbx CDR StartTime 2025-03-02 15:22:05 - End Time 2025-03-02 18:22:05 [2025-03-02 18:22:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592925', 'tblTempUsageDetail_20' ) start [2025-03-02 18:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592925', 'tblTempUsageDetail_20' ) end [2025-03-02 18:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592925', 'tblTempVendorCDR_20' ) start [2025-03-02 18:22:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592925', 'tblTempVendorCDR_20' ) end [2025-03-02 18:22:18] Production.INFO: ProcessCDR(1,14592925,1,1,2) [2025-03-02 18:22:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592925,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:22:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592925,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:22:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592925,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:22:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592925,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:22:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592925', 'tblTempUsageDetail_20' ) start [2025-03-02 18:22:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592925', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:22:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:22:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:22:25] Production.INFO: ==19357== Releasing lock... [2025-03-02 18:22:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:22:25] Production.INFO: 46 MB #Memory Used# [2025-03-02 18:23:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:23:04 [end_date_ymd] => 2025-03-02 18:23:04 [RateCDR] => 1 ) [2025-03-02 18:23: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-03-02 15:23:04' and `end` < '2025-03-02 18:23: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-03-02 18:23:16] Production.INFO: count ==2281 [2025-03-02 18:23:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:23:04 - End Time 2025-03-02 18:23:04 [2025-03-02 18:23:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592930', 'tblTempUsageDetail_20' ) start [2025-03-02 18:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592930', 'tblTempUsageDetail_20' ) end [2025-03-02 18:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592930', 'tblTempVendorCDR_20' ) start [2025-03-02 18:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592930', 'tblTempVendorCDR_20' ) end [2025-03-02 18:23:17] Production.INFO: ProcessCDR(1,14592930,1,1,2) [2025-03-02 18:23:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592930,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:23:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592930,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:23:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592930,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:23:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592930,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:23:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592930', 'tblTempUsageDetail_20' ) start [2025-03-02 18:23:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592930', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:23:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:23:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:23:24] Production.INFO: ==19449== Releasing lock... [2025-03-02 18:23:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:23:24] Production.INFO: 45.75 MB #Memory Used# [2025-03-02 18:24:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:24:05 [end_date_ymd] => 2025-03-02 18:24:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 15:24:05' and `end` < '2025-03-02 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-03-02 18:24:17] Production.INFO: count ==2277 [2025-03-02 18:24:18] Production.ERROR: pbx CDR StartTime 2025-03-02 15:24:05 - End Time 2025-03-02 18:24:05 [2025-03-02 18:24:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592935', 'tblTempUsageDetail_20' ) start [2025-03-02 18:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592935', 'tblTempUsageDetail_20' ) end [2025-03-02 18:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592935', 'tblTempVendorCDR_20' ) start [2025-03-02 18:24:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592935', 'tblTempVendorCDR_20' ) end [2025-03-02 18:24:18] Production.INFO: ProcessCDR(1,14592935,1,1,2) [2025-03-02 18:24:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592935,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:24:21] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592935,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:24:21] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592935,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:24:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592935,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:24:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592935', 'tblTempUsageDetail_20' ) start [2025-03-02 18:24:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592935', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:24:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:24:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:24:25] Production.INFO: ==19535== Releasing lock... [2025-03-02 18:24:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:24:25] Production.INFO: 45.5 MB #Memory Used# [2025-03-02 18:25:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:25:04 [end_date_ymd] => 2025-03-02 18:25:04 [RateCDR] => 1 ) [2025-03-02 18: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-03-02 15:25:04' and `end` < '2025-03-02 18: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-03-02 18:25:16] Production.INFO: count ==2276 [2025-03-02 18:25:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:25:04 - End Time 2025-03-02 18:25:04 [2025-03-02 18:25:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592940', 'tblTempUsageDetail_20' ) start [2025-03-02 18:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592940', 'tblTempUsageDetail_20' ) end [2025-03-02 18:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592940', 'tblTempVendorCDR_20' ) start [2025-03-02 18:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592940', 'tblTempVendorCDR_20' ) end [2025-03-02 18:25:17] Production.INFO: ProcessCDR(1,14592940,1,1,2) [2025-03-02 18:25:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592940,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:25:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592940,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:25:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592940,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:25:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592940,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592940', 'tblTempUsageDetail_20' ) start [2025-03-02 18:25:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592940', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:25:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:25:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:25:23] Production.INFO: ==19656== Releasing lock... [2025-03-02 18:25:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:25:23] Production.INFO: 45.5 MB #Memory Used# [2025-03-02 18:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:26:05 [end_date_ymd] => 2025-03-02 18:26:05 [RateCDR] => 1 ) [2025-03-02 18: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-03-02 15:26:05' and `end` < '2025-03-02 18: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-03-02 18:26:17] Production.INFO: count ==2276 [2025-03-02 18:26:18] Production.ERROR: pbx CDR StartTime 2025-03-02 15:26:05 - End Time 2025-03-02 18:26:05 [2025-03-02 18:26:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592945', 'tblTempUsageDetail_20' ) start [2025-03-02 18:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592945', 'tblTempUsageDetail_20' ) end [2025-03-02 18:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592945', 'tblTempVendorCDR_20' ) start [2025-03-02 18:26:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592945', 'tblTempVendorCDR_20' ) end [2025-03-02 18:26:18] Production.INFO: ProcessCDR(1,14592945,1,1,2) [2025-03-02 18:26:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592945,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:26:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592945,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:26:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592945,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:26:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592945,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:26:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592945', 'tblTempUsageDetail_20' ) start [2025-03-02 18:26:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592945', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:26:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:26:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:26:25] Production.INFO: ==19751== Releasing lock... [2025-03-02 18:26:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:26:25] Production.INFO: 45.5 MB #Memory Used# [2025-03-02 18:27:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:27:04 [end_date_ymd] => 2025-03-02 18:27:04 [RateCDR] => 1 ) [2025-03-02 18:27: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-03-02 15:27:04' and `end` < '2025-03-02 18:27: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-03-02 18:27:16] Production.INFO: count ==2275 [2025-03-02 18:27:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:27:04 - End Time 2025-03-02 18:27:04 [2025-03-02 18:27:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592950', 'tblTempUsageDetail_20' ) start [2025-03-02 18:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592950', 'tblTempUsageDetail_20' ) end [2025-03-02 18:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592950', 'tblTempVendorCDR_20' ) start [2025-03-02 18:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592950', 'tblTempVendorCDR_20' ) end [2025-03-02 18:27:17] Production.INFO: ProcessCDR(1,14592950,1,1,2) [2025-03-02 18:27:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592950,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:27:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592950,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:27:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592950,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:27:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592950,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:27:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592950', 'tblTempUsageDetail_20' ) start [2025-03-02 18:27:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592950', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:27:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:27:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:27:24] Production.INFO: ==19846== Releasing lock... [2025-03-02 18:27:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:27:24] Production.INFO: 45.5 MB #Memory Used# [2025-03-02 18:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:28:05 [end_date_ymd] => 2025-03-02 18:28:05 [RateCDR] => 1 ) [2025-03-02 18: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-03-02 15:28:05' and `end` < '2025-03-02 18: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-03-02 18:28:17] Production.INFO: count ==2274 [2025-03-02 18:28:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:28:05 - End Time 2025-03-02 18:28:05 [2025-03-02 18:28:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592955', 'tblTempUsageDetail_20' ) start [2025-03-02 18:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592955', 'tblTempUsageDetail_20' ) end [2025-03-02 18:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592955', 'tblTempVendorCDR_20' ) start [2025-03-02 18:28:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592955', 'tblTempVendorCDR_20' ) end [2025-03-02 18:28:18] Production.INFO: ProcessCDR(1,14592955,1,1,2) [2025-03-02 18:28:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592955,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:28:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592955,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:28:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592955,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:28:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592955,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:28:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592955', 'tblTempUsageDetail_20' ) start [2025-03-02 18:28:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592955', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:28:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:28:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:28:24] Production.INFO: ==19939== Releasing lock... [2025-03-02 18:28:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:28:24] Production.INFO: 45.5 MB #Memory Used# [2025-03-02 18:29:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:29:04 [end_date_ymd] => 2025-03-02 18:29:04 [RateCDR] => 1 ) [2025-03-02 18: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-03-02 15:29:04' and `end` < '2025-03-02 18: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-03-02 18:29:16] Production.INFO: count ==2268 [2025-03-02 18:29:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:29:04 - End Time 2025-03-02 18:29:04 [2025-03-02 18:29:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592960', 'tblTempUsageDetail_20' ) start [2025-03-02 18:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592960', 'tblTempUsageDetail_20' ) end [2025-03-02 18:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592960', 'tblTempVendorCDR_20' ) start [2025-03-02 18:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592960', 'tblTempVendorCDR_20' ) end [2025-03-02 18:29:17] Production.INFO: ProcessCDR(1,14592960,1,1,2) [2025-03-02 18:29:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592960,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:29:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592960,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:29:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592960,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:29:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592960,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:29:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592960', 'tblTempUsageDetail_20' ) start [2025-03-02 18:29:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592960', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:29:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:29:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:29:24] Production.INFO: ==20023== Releasing lock... [2025-03-02 18:29:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:29:24] Production.INFO: 45.25 MB #Memory Used# [2025-03-02 18:30:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:30:05 [end_date_ymd] => 2025-03-02 18:30:05 [RateCDR] => 1 ) [2025-03-02 18: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-03-02 15:30:05' and `end` < '2025-03-02 18: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-03-02 18:30:17] Production.INFO: count ==2186 [2025-03-02 18:30:18] Production.ERROR: pbx CDR StartTime 2025-03-02 15:30:05 - End Time 2025-03-02 18:30:05 [2025-03-02 18:30:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592965', 'tblTempUsageDetail_20' ) start [2025-03-02 18:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592965', 'tblTempUsageDetail_20' ) end [2025-03-02 18:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592965', 'tblTempVendorCDR_20' ) start [2025-03-02 18:30:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592965', 'tblTempVendorCDR_20' ) end [2025-03-02 18:30:18] Production.INFO: ProcessCDR(1,14592965,1,1,2) [2025-03-02 18:30:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592965,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:30:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592965,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:30:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592965,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:30:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592965,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:30:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592965', 'tblTempUsageDetail_20' ) start [2025-03-02 18:30:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592965', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:30:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:30:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:30:25] Production.INFO: ==20113== Releasing lock... [2025-03-02 18:30:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:30:25] Production.INFO: 44.75 MB #Memory Used# [2025-03-02 18:31:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:31:04 [end_date_ymd] => 2025-03-02 18:31:04 [RateCDR] => 1 ) [2025-03-02 18:31: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-03-02 15:31:04' and `end` < '2025-03-02 18:31: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-03-02 18:31:16] Production.INFO: count ==2091 [2025-03-02 18:31:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:31:04 - End Time 2025-03-02 18:31:04 [2025-03-02 18:31:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592971', 'tblTempUsageDetail_20' ) start [2025-03-02 18:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592971', 'tblTempUsageDetail_20' ) end [2025-03-02 18:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592971', 'tblTempVendorCDR_20' ) start [2025-03-02 18:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592971', 'tblTempVendorCDR_20' ) end [2025-03-02 18:31:17] Production.INFO: ProcessCDR(1,14592971,1,1,2) [2025-03-02 18:31:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592971,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:31:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592971,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:31:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592971,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:31:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592971,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:31:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592971', 'tblTempUsageDetail_20' ) start [2025-03-02 18:31:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592971', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:31:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:31:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:31:24] Production.INFO: ==20189== Releasing lock... [2025-03-02 18:31:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:31:24] Production.INFO: 44 MB #Memory Used# [2025-03-02 18:32:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:32:04 [end_date_ymd] => 2025-03-02 18:32:04 [RateCDR] => 1 ) [2025-03-02 18: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-03-02 15:32:04' and `end` < '2025-03-02 18: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-03-02 18:32:17] Production.INFO: count ==2000 [2025-03-02 18:32:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:32:04 - End Time 2025-03-02 18:32:04 [2025-03-02 18:32:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592976', 'tblTempUsageDetail_20' ) start [2025-03-02 18:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592976', 'tblTempUsageDetail_20' ) end [2025-03-02 18:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592976', 'tblTempVendorCDR_20' ) start [2025-03-02 18:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592976', 'tblTempVendorCDR_20' ) end [2025-03-02 18:32:17] Production.INFO: ProcessCDR(1,14592976,1,1,2) [2025-03-02 18:32:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592976,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:32:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592976,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:32:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592976,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:32:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592976,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:32:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592976', 'tblTempUsageDetail_20' ) start [2025-03-02 18:32:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592976', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:32:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:32:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:32:24] Production.INFO: ==20266== Releasing lock... [2025-03-02 18:32:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:32:24] Production.INFO: 43.25 MB #Memory Used# [2025-03-02 18:33:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:33:04 [end_date_ymd] => 2025-03-02 18:33:04 [RateCDR] => 1 ) [2025-03-02 18:33: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-03-02 15:33:04' and `end` < '2025-03-02 18:33: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-03-02 18:33:17] Production.INFO: count ==1919 [2025-03-02 18:33:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:33:04 - End Time 2025-03-02 18:33:04 [2025-03-02 18:33:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592981', 'tblTempUsageDetail_20' ) start [2025-03-02 18:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592981', 'tblTempUsageDetail_20' ) end [2025-03-02 18:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592981', 'tblTempVendorCDR_20' ) start [2025-03-02 18:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592981', 'tblTempVendorCDR_20' ) end [2025-03-02 18:33:17] Production.INFO: ProcessCDR(1,14592981,1,1,2) [2025-03-02 18:33:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592981,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:33:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592981,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:33:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592981,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:33:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592981,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:33:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592981', 'tblTempUsageDetail_20' ) start [2025-03-02 18:33:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592981', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:33:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:33:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:33:24] Production.INFO: ==20345== Releasing lock... [2025-03-02 18:33:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:33:24] Production.INFO: 43 MB #Memory Used# [2025-03-02 18:34:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:34:04 [end_date_ymd] => 2025-03-02 18:34:04 [RateCDR] => 1 ) [2025-03-02 18:34: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-03-02 15:34:04' and `end` < '2025-03-02 18:34: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-03-02 18:34:17] Production.INFO: count ==1838 [2025-03-02 18:34:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:34:04 - End Time 2025-03-02 18:34:04 [2025-03-02 18:34:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592986', 'tblTempUsageDetail_20' ) start [2025-03-02 18:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592986', 'tblTempUsageDetail_20' ) end [2025-03-02 18:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592986', 'tblTempVendorCDR_20' ) start [2025-03-02 18:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592986', 'tblTempVendorCDR_20' ) end [2025-03-02 18:34:17] Production.INFO: ProcessCDR(1,14592986,1,1,2) [2025-03-02 18:34:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592986,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:34:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592986,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:34:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592986,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:34:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592986,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:34:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592986', 'tblTempUsageDetail_20' ) start [2025-03-02 18:34:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592986', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:34:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:34:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:34:24] Production.INFO: ==20427== Releasing lock... [2025-03-02 18:34:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:34:24] Production.INFO: 42.5 MB #Memory Used# [2025-03-02 18:35:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:35:04 [end_date_ymd] => 2025-03-02 18:35:04 [RateCDR] => 1 ) [2025-03-02 18: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-03-02 15:35:04' and `end` < '2025-03-02 18: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-03-02 18:35:16] Production.INFO: count ==1761 [2025-03-02 18:35:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:35:04 - End Time 2025-03-02 18:35:04 [2025-03-02 18:35:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592991', 'tblTempUsageDetail_20' ) start [2025-03-02 18:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592991', 'tblTempUsageDetail_20' ) end [2025-03-02 18:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592991', 'tblTempVendorCDR_20' ) start [2025-03-02 18:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592991', 'tblTempVendorCDR_20' ) end [2025-03-02 18:35:17] Production.INFO: ProcessCDR(1,14592991,1,1,2) [2025-03-02 18:35:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592991,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:35:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592991,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:35:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592991,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:35:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592991,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:35:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592991', 'tblTempUsageDetail_20' ) start [2025-03-02 18:35:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592991', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:35:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:35:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:35:24] Production.INFO: ==20509== Releasing lock... [2025-03-02 18:35:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:35:24] Production.INFO: 42 MB #Memory Used# [2025-03-02 18:36:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:36:05 [end_date_ymd] => 2025-03-02 18:36:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 15:36:05' and `end` < '2025-03-02 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-03-02 18:36:17] Production.INFO: count ==1697 [2025-03-02 18:36:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:36:05 - End Time 2025-03-02 18:36:05 [2025-03-02 18:36:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592996', 'tblTempUsageDetail_20' ) start [2025-03-02 18:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14592996', 'tblTempUsageDetail_20' ) end [2025-03-02 18:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592996', 'tblTempVendorCDR_20' ) start [2025-03-02 18:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14592996', 'tblTempVendorCDR_20' ) end [2025-03-02 18:36:17] Production.INFO: ProcessCDR(1,14592996,1,1,2) [2025-03-02 18:36:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14592996,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:36:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14592996,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:36:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14592996,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:36:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14592996,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:36:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14592996', 'tblTempUsageDetail_20' ) start [2025-03-02 18:36:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14592996', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:36:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:36:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:36:24] Production.INFO: ==20606== Releasing lock... [2025-03-02 18:36:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:36:24] Production.INFO: 41.25 MB #Memory Used# [2025-03-02 18:37:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:37:04 [end_date_ymd] => 2025-03-02 18:37:04 [RateCDR] => 1 ) [2025-03-02 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-03-02 15:37:04' and `end` < '2025-03-02 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-03-02 18:37:16] Production.INFO: count ==1610 [2025-03-02 18:37:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:37:04 - End Time 2025-03-02 18:37:04 [2025-03-02 18:37:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593001', 'tblTempUsageDetail_20' ) start [2025-03-02 18:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593001', 'tblTempUsageDetail_20' ) end [2025-03-02 18:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593001', 'tblTempVendorCDR_20' ) start [2025-03-02 18:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593001', 'tblTempVendorCDR_20' ) end [2025-03-02 18:37:17] Production.INFO: ProcessCDR(1,14593001,1,1,2) [2025-03-02 18:37:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593001,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:37:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593001,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:37:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593001,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:37:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593001,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:37:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593001', 'tblTempUsageDetail_20' ) start [2025-03-02 18:37:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593001', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:37:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:37:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:37:24] Production.INFO: ==20690== Releasing lock... [2025-03-02 18:37:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:37:24] Production.INFO: 41.25 MB #Memory Used# [2025-03-02 18:38:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:38:04 [end_date_ymd] => 2025-03-02 18:38:04 [RateCDR] => 1 ) [2025-03-02 18:38: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-03-02 15:38:04' and `end` < '2025-03-02 18:38: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-03-02 18:38:16] Production.INFO: count ==1555 [2025-03-02 18:38:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:38:04 - End Time 2025-03-02 18:38:04 [2025-03-02 18:38:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593006', 'tblTempUsageDetail_20' ) start [2025-03-02 18:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593006', 'tblTempUsageDetail_20' ) end [2025-03-02 18:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593006', 'tblTempVendorCDR_20' ) start [2025-03-02 18:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593006', 'tblTempVendorCDR_20' ) end [2025-03-02 18:38:17] Production.INFO: ProcessCDR(1,14593006,1,1,2) [2025-03-02 18:38:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593006,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:38:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593006,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:38:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593006,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:38:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593006,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:38:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593006', 'tblTempUsageDetail_20' ) start [2025-03-02 18:38:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593006', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:38:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:38:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:38:24] Production.INFO: ==20770== Releasing lock... [2025-03-02 18:38:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:38:24] Production.INFO: 40.25 MB #Memory Used# [2025-03-02 18:39:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:39:04 [end_date_ymd] => 2025-03-02 18:39:04 [RateCDR] => 1 ) [2025-03-02 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-03-02 15:39:04' and `end` < '2025-03-02 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-03-02 18:39:16] Production.INFO: count ==1553 [2025-03-02 18:39:16] Production.ERROR: pbx CDR StartTime 2025-03-02 15:39:04 - End Time 2025-03-02 18:39:04 [2025-03-02 18:39:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593011', 'tblTempUsageDetail_20' ) start [2025-03-02 18:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593011', 'tblTempUsageDetail_20' ) end [2025-03-02 18:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593011', 'tblTempVendorCDR_20' ) start [2025-03-02 18:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593011', 'tblTempVendorCDR_20' ) end [2025-03-02 18:39:16] Production.INFO: ProcessCDR(1,14593011,1,1,2) [2025-03-02 18:39:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593011,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:39:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593011,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:39:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593011,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:39:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593011,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:39:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593011', 'tblTempUsageDetail_20' ) start [2025-03-02 18:39:22] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593011', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:39:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:39:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:39:23] Production.INFO: ==20844== Releasing lock... [2025-03-02 18:39:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:39:23] Production.INFO: 40.25 MB #Memory Used# [2025-03-02 18:40:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:40:05 [end_date_ymd] => 2025-03-02 18:40:05 [RateCDR] => 1 ) [2025-03-02 18: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-03-02 15:40:05' and `end` < '2025-03-02 18: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-03-02 18:40:17] Production.INFO: count ==1546 [2025-03-02 18:40:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:40:05 - End Time 2025-03-02 18:40:05 [2025-03-02 18:40:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593017', 'tblTempUsageDetail_20' ) start [2025-03-02 18:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593017', 'tblTempUsageDetail_20' ) end [2025-03-02 18:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593017', 'tblTempVendorCDR_20' ) start [2025-03-02 18:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593017', 'tblTempVendorCDR_20' ) end [2025-03-02 18:40:17] Production.INFO: ProcessCDR(1,14593017,1,1,2) [2025-03-02 18:40:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593017,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:40:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593017,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:40:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593017,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:40:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593017,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:40:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593017', 'tblTempUsageDetail_20' ) start [2025-03-02 18:40:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593017', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:40:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:40:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:40:24] Production.INFO: ==20933== Releasing lock... [2025-03-02 18:40:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:40:24] Production.INFO: 40.25 MB #Memory Used# [2025-03-02 18:41:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:41:05 [end_date_ymd] => 2025-03-02 18:41:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 15:41:05' and `end` < '2025-03-02 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-03-02 18:41:17] Production.INFO: count ==1561 [2025-03-02 18:41:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:41:05 - End Time 2025-03-02 18:41:05 [2025-03-02 18:41:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593022', 'tblTempUsageDetail_20' ) start [2025-03-02 18:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593022', 'tblTempUsageDetail_20' ) end [2025-03-02 18:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593022', 'tblTempVendorCDR_20' ) start [2025-03-02 18:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593022', 'tblTempVendorCDR_20' ) end [2025-03-02 18:41:17] Production.INFO: ProcessCDR(1,14593022,1,1,2) [2025-03-02 18:41:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593022,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:41:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593022,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:41:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593022,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:41:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593022,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:41:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593022', 'tblTempUsageDetail_20' ) start [2025-03-02 18:41:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593022', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:41:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:41:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:41:24] Production.INFO: ==21055== Releasing lock... [2025-03-02 18:41:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:41:24] Production.INFO: 40.5 MB #Memory Used# [2025-03-02 18:42:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:42:04 [end_date_ymd] => 2025-03-02 18:42:04 [RateCDR] => 1 ) [2025-03-02 18: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-03-02 15:42:04' and `end` < '2025-03-02 18: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-03-02 18:42:16] Production.INFO: count ==1560 [2025-03-02 18:42:16] Production.ERROR: pbx CDR StartTime 2025-03-02 15:42:04 - End Time 2025-03-02 18:42:04 [2025-03-02 18:42:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593027', 'tblTempUsageDetail_20' ) start [2025-03-02 18:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593027', 'tblTempUsageDetail_20' ) end [2025-03-02 18:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593027', 'tblTempVendorCDR_20' ) start [2025-03-02 18:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593027', 'tblTempVendorCDR_20' ) end [2025-03-02 18:42:16] Production.INFO: ProcessCDR(1,14593027,1,1,2) [2025-03-02 18:42:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593027,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:42:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593027,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:42:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593027,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:42:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593027,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:42:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593027', 'tblTempUsageDetail_20' ) start [2025-03-02 18:42:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593027', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:42:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:42:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:42:24] Production.INFO: ==21138== Releasing lock... [2025-03-02 18:42:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:42:24] Production.INFO: 40.5 MB #Memory Used# [2025-03-02 18:43:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:43:04 [end_date_ymd] => 2025-03-02 18:43:04 [RateCDR] => 1 ) [2025-03-02 18:43: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-03-02 15:43:04' and `end` < '2025-03-02 18:43: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-03-02 18:43:17] Production.INFO: count ==1562 [2025-03-02 18:43:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:43:04 - End Time 2025-03-02 18:43:04 [2025-03-02 18:43:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593032', 'tblTempUsageDetail_20' ) start [2025-03-02 18:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593032', 'tblTempUsageDetail_20' ) end [2025-03-02 18:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593032', 'tblTempVendorCDR_20' ) start [2025-03-02 18:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593032', 'tblTempVendorCDR_20' ) end [2025-03-02 18:43:17] Production.INFO: ProcessCDR(1,14593032,1,1,2) [2025-03-02 18:43:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593032,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:43:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593032,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:43:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593032,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:43:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593032,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:43:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593032', 'tblTempUsageDetail_20' ) start [2025-03-02 18:43:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593032', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:43:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:43:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:43:24] Production.INFO: ==21219== Releasing lock... [2025-03-02 18:43:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:43:24] Production.INFO: 40.5 MB #Memory Used# [2025-03-02 18:44:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:44:04 [end_date_ymd] => 2025-03-02 18:44:04 [RateCDR] => 1 ) [2025-03-02 18: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-03-02 15:44:04' and `end` < '2025-03-02 18: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-03-02 18:44:16] Production.INFO: count ==1564 [2025-03-02 18:44:16] Production.ERROR: pbx CDR StartTime 2025-03-02 15:44:04 - End Time 2025-03-02 18:44:04 [2025-03-02 18:44:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593037', 'tblTempUsageDetail_20' ) start [2025-03-02 18:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593037', 'tblTempUsageDetail_20' ) end [2025-03-02 18:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593037', 'tblTempVendorCDR_20' ) start [2025-03-02 18:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593037', 'tblTempVendorCDR_20' ) end [2025-03-02 18:44:16] Production.INFO: ProcessCDR(1,14593037,1,1,2) [2025-03-02 18:44:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593037,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:44:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593037,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:44:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593037,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:44:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593037,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593037', 'tblTempUsageDetail_20' ) start [2025-03-02 18:44:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593037', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:44:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:44:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:44:23] Production.INFO: ==21339== Releasing lock... [2025-03-02 18:44:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:44:23] Production.INFO: 40.5 MB #Memory Used# [2025-03-02 18:45:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:45:04 [end_date_ymd] => 2025-03-02 18:45:04 [RateCDR] => 1 ) [2025-03-02 18: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-03-02 15:45:04' and `end` < '2025-03-02 18: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-03-02 18:45:16] Production.INFO: count ==1566 [2025-03-02 18:45:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:45:04 - End Time 2025-03-02 18:45:04 [2025-03-02 18:45:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593042', 'tblTempUsageDetail_20' ) start [2025-03-02 18:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593042', 'tblTempUsageDetail_20' ) end [2025-03-02 18:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593042', 'tblTempVendorCDR_20' ) start [2025-03-02 18:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593042', 'tblTempVendorCDR_20' ) end [2025-03-02 18:45:17] Production.INFO: ProcessCDR(1,14593042,1,1,2) [2025-03-02 18:45:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593042,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:45:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593042,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:45:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593042,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:45:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593042,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:45:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593042', 'tblTempUsageDetail_20' ) start [2025-03-02 18:45:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593042', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:45:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:45:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:45:24] Production.INFO: ==21469== Releasing lock... [2025-03-02 18:45:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:45:24] Production.INFO: 40.5 MB #Memory Used# [2025-03-02 18:46:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:46:04 [end_date_ymd] => 2025-03-02 18:46:04 [RateCDR] => 1 ) [2025-03-02 18: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-03-02 15:46:04' and `end` < '2025-03-02 18: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-03-02 18:46:16] Production.INFO: count ==1566 [2025-03-02 18:46:16] Production.ERROR: pbx CDR StartTime 2025-03-02 15:46:04 - End Time 2025-03-02 18:46:04 [2025-03-02 18:46:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:46:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593047', 'tblTempUsageDetail_20' ) start [2025-03-02 18:46:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593047', 'tblTempUsageDetail_20' ) end [2025-03-02 18:46:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593047', 'tblTempVendorCDR_20' ) start [2025-03-02 18:46:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593047', 'tblTempVendorCDR_20' ) end [2025-03-02 18:46:16] Production.INFO: ProcessCDR(1,14593047,1,1,2) [2025-03-02 18:46:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593047,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:46:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593047,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:46:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593047,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:46:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593047,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593047', 'tblTempUsageDetail_20' ) start [2025-03-02 18:46:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593047', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:46:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:46:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:46:24] Production.INFO: ==21567== Releasing lock... [2025-03-02 18:46:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:46:24] Production.INFO: 40.5 MB #Memory Used# [2025-03-02 18:47:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:47:05 [end_date_ymd] => 2025-03-02 18:47:05 [RateCDR] => 1 ) [2025-03-02 18: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-03-02 15:47:05' and `end` < '2025-03-02 18: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-03-02 18:47:17] Production.INFO: count ==1558 [2025-03-02 18:47:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:47:05 - End Time 2025-03-02 18:47:05 [2025-03-02 18:47:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593052', 'tblTempUsageDetail_20' ) start [2025-03-02 18:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593052', 'tblTempUsageDetail_20' ) end [2025-03-02 18:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593052', 'tblTempVendorCDR_20' ) start [2025-03-02 18:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593052', 'tblTempVendorCDR_20' ) end [2025-03-02 18:47:17] Production.INFO: ProcessCDR(1,14593052,1,1,2) [2025-03-02 18:47:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593052,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:47:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593052,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:47:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593052,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:47:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593052,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:47:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593052', 'tblTempUsageDetail_20' ) start [2025-03-02 18:47:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593052', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:47:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:47:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:47:25] Production.INFO: ==21655== Releasing lock... [2025-03-02 18:47:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:47:25] Production.INFO: 40.25 MB #Memory Used# [2025-03-02 18:48:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:48:04 [end_date_ymd] => 2025-03-02 18:48:04 [RateCDR] => 1 ) [2025-03-02 18: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-03-02 15:48:04' and `end` < '2025-03-02 18: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-03-02 18:48:16] Production.INFO: count ==1559 [2025-03-02 18:48:16] Production.ERROR: pbx CDR StartTime 2025-03-02 15:48:04 - End Time 2025-03-02 18:48:04 [2025-03-02 18:48:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593057', 'tblTempUsageDetail_20' ) start [2025-03-02 18:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593057', 'tblTempUsageDetail_20' ) end [2025-03-02 18:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593057', 'tblTempVendorCDR_20' ) start [2025-03-02 18:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593057', 'tblTempVendorCDR_20' ) end [2025-03-02 18:48:16] Production.INFO: ProcessCDR(1,14593057,1,1,2) [2025-03-02 18:48:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593057,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:48:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593057,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:48:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593057,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:48:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593057,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:48:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593057', 'tblTempUsageDetail_20' ) start [2025-03-02 18:48:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593057', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:48:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:48:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:48:24] Production.INFO: ==21735== Releasing lock... [2025-03-02 18:48:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:48:24] Production.INFO: 40.25 MB #Memory Used# [2025-03-02 18:49:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:49:04 [end_date_ymd] => 2025-03-02 18:49:04 [RateCDR] => 1 ) [2025-03-02 18:49: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-03-02 15:49:04' and `end` < '2025-03-02 18:49: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-03-02 18:49:16] Production.INFO: count ==1558 [2025-03-02 18:49:16] Production.ERROR: pbx CDR StartTime 2025-03-02 15:49:04 - End Time 2025-03-02 18:49:04 [2025-03-02 18:49:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593062', 'tblTempUsageDetail_20' ) start [2025-03-02 18:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593062', 'tblTempUsageDetail_20' ) end [2025-03-02 18:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593062', 'tblTempVendorCDR_20' ) start [2025-03-02 18:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593062', 'tblTempVendorCDR_20' ) end [2025-03-02 18:49:16] Production.INFO: ProcessCDR(1,14593062,1,1,2) [2025-03-02 18:49:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593062,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:49:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593062,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:49:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593062,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:49:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593062,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:49:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593062', 'tblTempUsageDetail_20' ) start [2025-03-02 18:49:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593062', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:49:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:49:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:49:24] Production.INFO: ==21821== Releasing lock... [2025-03-02 18:49:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:49:24] Production.INFO: 40.25 MB #Memory Used# [2025-03-02 18:50:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:50:04 [end_date_ymd] => 2025-03-02 18:50:04 [RateCDR] => 1 ) [2025-03-02 18:50: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-03-02 15:50:04' and `end` < '2025-03-02 18:50: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-03-02 18:50:16] Production.INFO: count ==1548 [2025-03-02 18:50:16] Production.ERROR: pbx CDR StartTime 2025-03-02 15:50:04 - End Time 2025-03-02 18:50:04 [2025-03-02 18:50:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:50:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593067', 'tblTempUsageDetail_20' ) start [2025-03-02 18:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593067', 'tblTempUsageDetail_20' ) end [2025-03-02 18:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593067', 'tblTempVendorCDR_20' ) start [2025-03-02 18:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593067', 'tblTempVendorCDR_20' ) end [2025-03-02 18:50:17] Production.INFO: ProcessCDR(1,14593067,1,1,2) [2025-03-02 18:50:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593067,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:50:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593067,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:50:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593067,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:50:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593067,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:50:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593067', 'tblTempUsageDetail_20' ) start [2025-03-02 18:50:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593067', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:50:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:50:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:50:24] Production.INFO: ==21901== Releasing lock... [2025-03-02 18:50:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:50:24] Production.INFO: 40.25 MB #Memory Used# [2025-03-02 18:51:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:51:04 [end_date_ymd] => 2025-03-02 18:51:04 [RateCDR] => 1 ) [2025-03-02 18: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-03-02 15:51:04' and `end` < '2025-03-02 18: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-03-02 18:51:16] Production.INFO: count ==1554 [2025-03-02 18:51:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:51:04 - End Time 2025-03-02 18:51:04 [2025-03-02 18:51:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593073', 'tblTempUsageDetail_20' ) start [2025-03-02 18:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593073', 'tblTempUsageDetail_20' ) end [2025-03-02 18:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593073', 'tblTempVendorCDR_20' ) start [2025-03-02 18:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593073', 'tblTempVendorCDR_20' ) end [2025-03-02 18:51:17] Production.INFO: ProcessCDR(1,14593073,1,1,2) [2025-03-02 18:51:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593073,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:51:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593073,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:51:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593073,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:51:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593073,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:51:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593073', 'tblTempUsageDetail_20' ) start [2025-03-02 18:51:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593073', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:51:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:51:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:51:24] Production.INFO: ==21986== Releasing lock... [2025-03-02 18:51:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:51:24] Production.INFO: 40.25 MB #Memory Used# [2025-03-02 18:52:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:52:05 [end_date_ymd] => 2025-03-02 18:52:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 15:52:05' and `end` < '2025-03-02 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-03-02 18:52:17] Production.INFO: count ==1555 [2025-03-02 18:52:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:52:05 - End Time 2025-03-02 18:52:05 [2025-03-02 18:52:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593078', 'tblTempUsageDetail_20' ) start [2025-03-02 18:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593078', 'tblTempUsageDetail_20' ) end [2025-03-02 18:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593078', 'tblTempVendorCDR_20' ) start [2025-03-02 18:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593078', 'tblTempVendorCDR_20' ) end [2025-03-02 18:52:17] Production.INFO: ProcessCDR(1,14593078,1,1,2) [2025-03-02 18:52:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593078,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:52:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593078,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:52:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593078,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:52:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593078,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:52:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593078', 'tblTempUsageDetail_20' ) start [2025-03-02 18:52:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593078', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:52:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:52:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:52:24] Production.INFO: ==22076== Releasing lock... [2025-03-02 18:52:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:52:24] Production.INFO: 40.25 MB #Memory Used# [2025-03-02 18:53:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:53:04 [end_date_ymd] => 2025-03-02 18:53:04 [RateCDR] => 1 ) [2025-03-02 18: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-03-02 15:53:04' and `end` < '2025-03-02 18: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-03-02 18:53:16] Production.INFO: count ==1550 [2025-03-02 18:53:16] Production.ERROR: pbx CDR StartTime 2025-03-02 15:53:04 - End Time 2025-03-02 18:53:04 [2025-03-02 18:53:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593083', 'tblTempUsageDetail_20' ) start [2025-03-02 18:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593083', 'tblTempUsageDetail_20' ) end [2025-03-02 18:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593083', 'tblTempVendorCDR_20' ) start [2025-03-02 18:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593083', 'tblTempVendorCDR_20' ) end [2025-03-02 18:53:16] Production.INFO: ProcessCDR(1,14593083,1,1,2) [2025-03-02 18:53:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593083,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:53:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593083,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:53:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593083,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:53:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593083,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593083', 'tblTempUsageDetail_20' ) start [2025-03-02 18:53:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593083', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:53:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:53:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:53:24] Production.INFO: ==22152== Releasing lock... [2025-03-02 18:53:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:53:24] Production.INFO: 40.25 MB #Memory Used# [2025-03-02 18:54:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:54:05 [end_date_ymd] => 2025-03-02 18:54:05 [RateCDR] => 1 ) [2025-03-02 18: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-03-02 15:54:05' and `end` < '2025-03-02 18: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-03-02 18:54:17] Production.INFO: count ==1518 [2025-03-02 18:54:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:54:05 - End Time 2025-03-02 18:54:05 [2025-03-02 18:54:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593088', 'tblTempUsageDetail_20' ) start [2025-03-02 18:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593088', 'tblTempUsageDetail_20' ) end [2025-03-02 18:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593088', 'tblTempVendorCDR_20' ) start [2025-03-02 18:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593088', 'tblTempVendorCDR_20' ) end [2025-03-02 18:54:17] Production.INFO: ProcessCDR(1,14593088,1,1,2) [2025-03-02 18:54:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593088,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:54:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593088,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:54:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593088,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:54:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593088,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:54:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593088', 'tblTempUsageDetail_20' ) start [2025-03-02 18:54:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593088', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:54:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:54:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:54:25] Production.INFO: ==22233== Releasing lock... [2025-03-02 18:54:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:54:25] Production.INFO: 40 MB #Memory Used# [2025-03-02 18:55:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:55:04 [end_date_ymd] => 2025-03-02 18:55:04 [RateCDR] => 1 ) [2025-03-02 18:55: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-03-02 15:55:04' and `end` < '2025-03-02 18:55: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-03-02 18:55:16] Production.INFO: count ==1524 [2025-03-02 18:55:16] Production.ERROR: pbx CDR StartTime 2025-03-02 15:55:04 - End Time 2025-03-02 18:55:04 [2025-03-02 18:55:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593093', 'tblTempUsageDetail_20' ) start [2025-03-02 18:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593093', 'tblTempUsageDetail_20' ) end [2025-03-02 18:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593093', 'tblTempVendorCDR_20' ) start [2025-03-02 18:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593093', 'tblTempVendorCDR_20' ) end [2025-03-02 18:55:16] Production.INFO: ProcessCDR(1,14593093,1,1,2) [2025-03-02 18:55:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593093,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:55:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593093,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:55:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593093,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:55:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593093,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593093', 'tblTempUsageDetail_20' ) start [2025-03-02 18:55:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593093', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:55:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:55:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:55:23] Production.INFO: ==22319== Releasing lock... [2025-03-02 18:55:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:55:23] Production.INFO: 40 MB #Memory Used# [2025-03-02 18:56:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:56:04 [end_date_ymd] => 2025-03-02 18:56:04 [RateCDR] => 1 ) [2025-03-02 18:56: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-03-02 15:56:04' and `end` < '2025-03-02 18:56: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-03-02 18:56:16] Production.INFO: count ==1524 [2025-03-02 18:56:16] Production.ERROR: pbx CDR StartTime 2025-03-02 15:56:04 - End Time 2025-03-02 18:56:04 [2025-03-02 18:56:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593098', 'tblTempUsageDetail_20' ) start [2025-03-02 18:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593098', 'tblTempUsageDetail_20' ) end [2025-03-02 18:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593098', 'tblTempVendorCDR_20' ) start [2025-03-02 18:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593098', 'tblTempVendorCDR_20' ) end [2025-03-02 18:56:16] Production.INFO: ProcessCDR(1,14593098,1,1,2) [2025-03-02 18:56:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593098,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:56:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593098,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:56:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593098,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:56:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593098,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:56:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593098', 'tblTempUsageDetail_20' ) start [2025-03-02 18:56:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593098', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:56:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:56:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:56:24] Production.INFO: ==22441== Releasing lock... [2025-03-02 18:56:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:56:24] Production.INFO: 40 MB #Memory Used# [2025-03-02 18:57:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:57:04 [end_date_ymd] => 2025-03-02 18:57:04 [RateCDR] => 1 ) [2025-03-02 18:57: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-03-02 15:57:04' and `end` < '2025-03-02 18:57: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-03-02 18:57:16] Production.INFO: count ==1527 [2025-03-02 18:57:16] Production.ERROR: pbx CDR StartTime 2025-03-02 15:57:04 - End Time 2025-03-02 18:57:04 [2025-03-02 18:57:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593103', 'tblTempUsageDetail_20' ) start [2025-03-02 18:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593103', 'tblTempUsageDetail_20' ) end [2025-03-02 18:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593103', 'tblTempVendorCDR_20' ) start [2025-03-02 18:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593103', 'tblTempVendorCDR_20' ) end [2025-03-02 18:57:16] Production.INFO: ProcessCDR(1,14593103,1,1,2) [2025-03-02 18:57:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593103,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:57:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593103,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:57:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593103,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:57:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593103,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:57:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593103', 'tblTempUsageDetail_20' ) start [2025-03-02 18:57:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593103', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:57:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:57:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:57:24] Production.INFO: ==22522== Releasing lock... [2025-03-02 18:57:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:57:24] Production.INFO: 40 MB #Memory Used# [2025-03-02 18:58:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:58:04 [end_date_ymd] => 2025-03-02 18:58:04 [RateCDR] => 1 ) [2025-03-02 18: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-03-02 15:58:04' and `end` < '2025-03-02 18: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-03-02 18:58:16] Production.INFO: count ==1530 [2025-03-02 18:58:17] Production.ERROR: pbx CDR StartTime 2025-03-02 15:58:04 - End Time 2025-03-02 18:58:04 [2025-03-02 18:58:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593108', 'tblTempUsageDetail_20' ) start [2025-03-02 18:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593108', 'tblTempUsageDetail_20' ) end [2025-03-02 18:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593108', 'tblTempVendorCDR_20' ) start [2025-03-02 18:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593108', 'tblTempVendorCDR_20' ) end [2025-03-02 18:58:17] Production.INFO: ProcessCDR(1,14593108,1,1,2) [2025-03-02 18:58:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593108,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:58:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593108,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:58:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593108,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:58:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593108,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:58:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593108', 'tblTempUsageDetail_20' ) start [2025-03-02 18:58:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593108', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:58:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:58:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:58:24] Production.INFO: ==22612== Releasing lock... [2025-03-02 18:58:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:58:24] Production.INFO: 40.25 MB #Memory Used# [2025-03-02 18:59:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 15:59:04 [end_date_ymd] => 2025-03-02 18:59:04 [RateCDR] => 1 ) [2025-03-02 18: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-03-02 15:59:04' and `end` < '2025-03-02 18: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-03-02 18:59:16] Production.INFO: count ==1529 [2025-03-02 18:59:16] Production.ERROR: pbx CDR StartTime 2025-03-02 15:59:04 - End Time 2025-03-02 18:59:04 [2025-03-02 18:59:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 18:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593113', 'tblTempUsageDetail_20' ) start [2025-03-02 18:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593113', 'tblTempUsageDetail_20' ) end [2025-03-02 18:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593113', 'tblTempVendorCDR_20' ) start [2025-03-02 18:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593113', 'tblTempVendorCDR_20' ) end [2025-03-02 18:59:16] Production.INFO: ProcessCDR(1,14593113,1,1,2) [2025-03-02 18:59:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593113,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:59:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593113,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 18:59:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593113,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:59:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593113,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 18:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593113', 'tblTempUsageDetail_20' ) start [2025-03-02 18:59:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593113', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 18:59:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 18:59:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 18:59:24] Production.INFO: ==22696== Releasing lock... [2025-03-02 18:59:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 18:59:24] Production.INFO: 40.25 MB #Memory Used# [2025-03-02 19:00:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:00:05 [end_date_ymd] => 2025-03-02 19:00:05 [RateCDR] => 1 ) [2025-03-02 19: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-03-02 16:00:05' and `end` < '2025-03-02 19: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-03-02 19:00:17] Production.INFO: count ==1530 [2025-03-02 19:00:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:00:05 - End Time 2025-03-02 19:00:05 [2025-03-02 19:00:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593118', 'tblTempUsageDetail_20' ) start [2025-03-02 19:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593118', 'tblTempUsageDetail_20' ) end [2025-03-02 19:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593118', 'tblTempVendorCDR_20' ) start [2025-03-02 19:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593118', 'tblTempVendorCDR_20' ) end [2025-03-02 19:00:17] Production.INFO: ProcessCDR(1,14593118,1,1,2) [2025-03-02 19:00:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593118,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:00:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593118,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:00:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593118,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:00:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593118,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:00:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593118', 'tblTempUsageDetail_20' ) start [2025-03-02 19:00:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593118', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:00:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:00:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:00:25] Production.INFO: ==22780== Releasing lock... [2025-03-02 19:00:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:00:25] Production.INFO: 40.25 MB #Memory Used# [2025-03-02 19:01:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:01:04 [end_date_ymd] => 2025-03-02 19:01:04 [RateCDR] => 1 ) [2025-03-02 19:01: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-03-02 16:01:04' and `end` < '2025-03-02 19:01: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-03-02 19:01:16] Production.INFO: count ==1539 [2025-03-02 19:01:16] Production.ERROR: pbx CDR StartTime 2025-03-02 16:01:04 - End Time 2025-03-02 19:01:04 [2025-03-02 19:01:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593124', 'tblTempUsageDetail_20' ) start [2025-03-02 19:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593124', 'tblTempUsageDetail_20' ) end [2025-03-02 19:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593124', 'tblTempVendorCDR_20' ) start [2025-03-02 19:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593124', 'tblTempVendorCDR_20' ) end [2025-03-02 19:01:16] Production.INFO: ProcessCDR(1,14593124,1,1,2) [2025-03-02 19:01:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593124,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:01:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593124,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:01:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593124,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:01:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593124,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593124', 'tblTempUsageDetail_20' ) start [2025-03-02 19:01:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593124', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:01:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:01:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:01:24] Production.INFO: ==22882== Releasing lock... [2025-03-02 19:01:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:01:24] Production.INFO: 40.25 MB #Memory Used# [2025-03-02 19:02:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:02:04 [end_date_ymd] => 2025-03-02 19:02:04 [RateCDR] => 1 ) [2025-03-02 19:02: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-03-02 16:02:04' and `end` < '2025-03-02 19:02: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-03-02 19:02:16] Production.INFO: count ==1534 [2025-03-02 19:02:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:02:04 - End Time 2025-03-02 19:02:04 [2025-03-02 19:02:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593129', 'tblTempUsageDetail_20' ) start [2025-03-02 19:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593129', 'tblTempUsageDetail_20' ) end [2025-03-02 19:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593129', 'tblTempVendorCDR_20' ) start [2025-03-02 19:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593129', 'tblTempVendorCDR_20' ) end [2025-03-02 19:02:17] Production.INFO: ProcessCDR(1,14593129,1,1,2) [2025-03-02 19:02:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593129,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:02:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593129,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:02:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593129,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:02:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593129,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:02:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593129', 'tblTempUsageDetail_20' ) start [2025-03-02 19:02:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593129', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:02:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:02:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:02:25] Production.INFO: ==23044== Releasing lock... [2025-03-02 19:02:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:02:25] Production.INFO: 40.25 MB #Memory Used# [2025-03-02 19:03:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:03:04 [end_date_ymd] => 2025-03-02 19:03:04 [RateCDR] => 1 ) [2025-03-02 19: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-03-02 16:03:04' and `end` < '2025-03-02 19: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-03-02 19:03:16] Production.INFO: count ==1530 [2025-03-02 19:03:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:03:04 - End Time 2025-03-02 19:03:04 [2025-03-02 19:03:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593134', 'tblTempUsageDetail_20' ) start [2025-03-02 19:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593134', 'tblTempUsageDetail_20' ) end [2025-03-02 19:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593134', 'tblTempVendorCDR_20' ) start [2025-03-02 19:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593134', 'tblTempVendorCDR_20' ) end [2025-03-02 19:03:17] Production.INFO: ProcessCDR(1,14593134,1,1,2) [2025-03-02 19:03:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593134,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:03:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593134,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:03:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593134,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:03:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593134,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:03:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593134', 'tblTempUsageDetail_20' ) start [2025-03-02 19:03:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593134', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:03:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:03:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:03:24] Production.INFO: ==23122== Releasing lock... [2025-03-02 19:03:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:03:24] Production.INFO: 40.25 MB #Memory Used# [2025-03-02 19:04:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:04:05 [end_date_ymd] => 2025-03-02 19:04:05 [RateCDR] => 1 ) [2025-03-02 19: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-03-02 16:04:05' and `end` < '2025-03-02 19: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-03-02 19:04:17] Production.INFO: count ==1525 [2025-03-02 19:04:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:04:05 - End Time 2025-03-02 19:04:05 [2025-03-02 19:04:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593139', 'tblTempUsageDetail_20' ) start [2025-03-02 19:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593139', 'tblTempUsageDetail_20' ) end [2025-03-02 19:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593139', 'tblTempVendorCDR_20' ) start [2025-03-02 19:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593139', 'tblTempVendorCDR_20' ) end [2025-03-02 19:04:17] Production.INFO: ProcessCDR(1,14593139,1,1,2) [2025-03-02 19:04:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593139,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:04:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593139,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:04:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593139,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:04:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593139,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:04:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593139', 'tblTempUsageDetail_20' ) start [2025-03-02 19:04:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593139', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:04:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:04:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:04:25] Production.INFO: ==23212== Releasing lock... [2025-03-02 19:04:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:04:25] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:05:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:05:04 [end_date_ymd] => 2025-03-02 19:05:04 [RateCDR] => 1 ) [2025-03-02 19:05: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-03-02 16:05:04' and `end` < '2025-03-02 19: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-03-02 19:05:16] Production.INFO: count ==1525 [2025-03-02 19:05:16] Production.ERROR: pbx CDR StartTime 2025-03-02 16:05:04 - End Time 2025-03-02 19:05:04 [2025-03-02 19:05:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593144', 'tblTempUsageDetail_20' ) start [2025-03-02 19:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593144', 'tblTempUsageDetail_20' ) end [2025-03-02 19:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593144', 'tblTempVendorCDR_20' ) start [2025-03-02 19:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593144', 'tblTempVendorCDR_20' ) end [2025-03-02 19:05:16] Production.INFO: ProcessCDR(1,14593144,1,1,2) [2025-03-02 19:05:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593144,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:05:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593144,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:05:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593144,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:05:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593144,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:05:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593144', 'tblTempUsageDetail_20' ) start [2025-03-02 19:05:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593144', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:05:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:05:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:05:24] Production.INFO: ==23379== Releasing lock... [2025-03-02 19:05:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:05:24] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:06:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:06:05 [end_date_ymd] => 2025-03-02 19:06:05 [RateCDR] => 1 ) [2025-03-02 19: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-03-02 16:06:05' and `end` < '2025-03-02 19: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-03-02 19:06:17] Production.INFO: count ==1522 [2025-03-02 19:06:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:06:05 - End Time 2025-03-02 19:06:05 [2025-03-02 19:06:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593149', 'tblTempUsageDetail_20' ) start [2025-03-02 19:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593149', 'tblTempUsageDetail_20' ) end [2025-03-02 19:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593149', 'tblTempVendorCDR_20' ) start [2025-03-02 19:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593149', 'tblTempVendorCDR_20' ) end [2025-03-02 19:06:17] Production.INFO: ProcessCDR(1,14593149,1,1,2) [2025-03-02 19:06:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593149,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:06:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593149,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:06:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593149,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:06:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593149,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:06:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593149', 'tblTempUsageDetail_20' ) start [2025-03-02 19:06:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593149', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:06:26] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:06:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:06:26] Production.INFO: ==23473== Releasing lock... [2025-03-02 19:06:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:06:26] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:07:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:07:04 [end_date_ymd] => 2025-03-02 19:07:04 [RateCDR] => 1 ) [2025-03-02 19: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-03-02 16:07:04' and `end` < '2025-03-02 19: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-03-02 19:07:17] Production.INFO: count ==1526 [2025-03-02 19:07:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:07:04 - End Time 2025-03-02 19:07:04 [2025-03-02 19:07:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593154', 'tblTempUsageDetail_20' ) start [2025-03-02 19:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593154', 'tblTempUsageDetail_20' ) end [2025-03-02 19:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593154', 'tblTempVendorCDR_20' ) start [2025-03-02 19:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593154', 'tblTempVendorCDR_20' ) end [2025-03-02 19:07:17] Production.INFO: ProcessCDR(1,14593154,1,1,2) [2025-03-02 19:07:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593154,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:07:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593154,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:07:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593154,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:07:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593154,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:07:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593154', 'tblTempUsageDetail_20' ) start [2025-03-02 19:07:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593154', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:07:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:07:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:07:25] Production.INFO: ==23549== Releasing lock... [2025-03-02 19:07:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:07:25] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:08:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:08:05 [end_date_ymd] => 2025-03-02 19:08:05 [RateCDR] => 1 ) [2025-03-02 19: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-03-02 16:08:05' and `end` < '2025-03-02 19: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-03-02 19:08:17] Production.INFO: count ==1529 [2025-03-02 19:08:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:08:05 - End Time 2025-03-02 19:08:05 [2025-03-02 19:08:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593159', 'tblTempUsageDetail_20' ) start [2025-03-02 19:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593159', 'tblTempUsageDetail_20' ) end [2025-03-02 19:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593159', 'tblTempVendorCDR_20' ) start [2025-03-02 19:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593159', 'tblTempVendorCDR_20' ) end [2025-03-02 19:08:17] Production.INFO: ProcessCDR(1,14593159,1,1,2) [2025-03-02 19:08:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593159,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:08:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593159,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:08:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593159,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:08:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593159,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:08:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593159', 'tblTempUsageDetail_20' ) start [2025-03-02 19:08:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593159', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:08:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:08:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:08:25] Production.INFO: ==23672== Releasing lock... [2025-03-02 19:08:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:08:25] Production.INFO: 40.25 MB #Memory Used# [2025-03-02 19:09:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:09:04 [end_date_ymd] => 2025-03-02 19:09:04 [RateCDR] => 1 ) [2025-03-02 19:09: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-03-02 16:09:04' and `end` < '2025-03-02 19:09: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-03-02 19:09:16] Production.INFO: count ==1526 [2025-03-02 19:09:16] Production.ERROR: pbx CDR StartTime 2025-03-02 16:09:04 - End Time 2025-03-02 19:09:04 [2025-03-02 19:09:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593164', 'tblTempUsageDetail_20' ) start [2025-03-02 19:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593164', 'tblTempUsageDetail_20' ) end [2025-03-02 19:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593164', 'tblTempVendorCDR_20' ) start [2025-03-02 19:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593164', 'tblTempVendorCDR_20' ) end [2025-03-02 19:09:17] Production.INFO: ProcessCDR(1,14593164,1,1,2) [2025-03-02 19:09:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593164,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:09:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593164,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:09:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593164,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:09:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593164,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:09:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593164', 'tblTempUsageDetail_20' ) start [2025-03-02 19:09:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593164', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:09:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:09:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:09:25] Production.INFO: ==23790== Releasing lock... [2025-03-02 19:09:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:09:25] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:10:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:10:05 [end_date_ymd] => 2025-03-02 19:10:05 [RateCDR] => 1 ) [2025-03-02 19: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-03-02 16:10:05' and `end` < '2025-03-02 19: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-03-02 19:10:17] Production.INFO: count ==1513 [2025-03-02 19:10:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:10:05 - End Time 2025-03-02 19:10:05 [2025-03-02 19:10:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593170', 'tblTempUsageDetail_20' ) start [2025-03-02 19:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593170', 'tblTempUsageDetail_20' ) end [2025-03-02 19:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593170', 'tblTempVendorCDR_20' ) start [2025-03-02 19:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593170', 'tblTempVendorCDR_20' ) end [2025-03-02 19:10:17] Production.INFO: ProcessCDR(1,14593170,1,1,2) [2025-03-02 19:10:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593170,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:10:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593170,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:10:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593170,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:10:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593170,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:10:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593170', 'tblTempUsageDetail_20' ) start [2025-03-02 19:10:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593170', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:10:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:10:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:10:25] Production.INFO: ==23889== Releasing lock... [2025-03-02 19:10:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:10:25] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:11:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:11:04 [end_date_ymd] => 2025-03-02 19:11:04 [RateCDR] => 1 ) [2025-03-02 19: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-03-02 16:11:04' and `end` < '2025-03-02 19: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-03-02 19:11:16] Production.INFO: count ==1527 [2025-03-02 19:11:16] Production.ERROR: pbx CDR StartTime 2025-03-02 16:11:04 - End Time 2025-03-02 19:11:04 [2025-03-02 19:11:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:11:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593175', 'tblTempUsageDetail_20' ) start [2025-03-02 19:11:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593175', 'tblTempUsageDetail_20' ) end [2025-03-02 19:11:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593175', 'tblTempVendorCDR_20' ) start [2025-03-02 19:11:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593175', 'tblTempVendorCDR_20' ) end [2025-03-02 19:11:16] Production.INFO: ProcessCDR(1,14593175,1,1,2) [2025-03-02 19:11:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593175,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:11:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593175,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:11:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593175,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:11:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593175,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:11:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593175', 'tblTempUsageDetail_20' ) start [2025-03-02 19:11:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593175', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:11:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:11:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:11:24] Production.INFO: ==23977== Releasing lock... [2025-03-02 19:11:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:11:24] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:12:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:12:04 [end_date_ymd] => 2025-03-02 19:12:04 [RateCDR] => 1 ) [2025-03-02 19:12: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-03-02 16:12:04' and `end` < '2025-03-02 19:12: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-03-02 19:12:16] Production.INFO: count ==1532 [2025-03-02 19:12:16] Production.ERROR: pbx CDR StartTime 2025-03-02 16:12:04 - End Time 2025-03-02 19:12:04 [2025-03-02 19:12:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593180', 'tblTempUsageDetail_20' ) start [2025-03-02 19:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593180', 'tblTempUsageDetail_20' ) end [2025-03-02 19:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593180', 'tblTempVendorCDR_20' ) start [2025-03-02 19:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593180', 'tblTempVendorCDR_20' ) end [2025-03-02 19:12:16] Production.INFO: ProcessCDR(1,14593180,1,1,2) [2025-03-02 19:12:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593180,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:12:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593180,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:12:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593180,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:12:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593180,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:12:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593180', 'tblTempUsageDetail_20' ) start [2025-03-02 19:12:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593180', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:12:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:12:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:12:24] Production.INFO: ==24183== Releasing lock... [2025-03-02 19:12:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:12:24] Production.INFO: 40.25 MB #Memory Used# [2025-03-02 19:13:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:13:04 [end_date_ymd] => 2025-03-02 19:13:04 [RateCDR] => 1 ) [2025-03-02 19:13: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-03-02 16:13:04' and `end` < '2025-03-02 19:13: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-03-02 19:13:16] Production.INFO: count ==1532 [2025-03-02 19:13:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:13:04 - End Time 2025-03-02 19:13:04 [2025-03-02 19:13:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593185', 'tblTempUsageDetail_20' ) start [2025-03-02 19:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593185', 'tblTempUsageDetail_20' ) end [2025-03-02 19:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593185', 'tblTempVendorCDR_20' ) start [2025-03-02 19:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593185', 'tblTempVendorCDR_20' ) end [2025-03-02 19:13:17] Production.INFO: ProcessCDR(1,14593185,1,1,2) [2025-03-02 19:13:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593185,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:13:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593185,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:13:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593185,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:13:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593185,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:13:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593185', 'tblTempUsageDetail_20' ) start [2025-03-02 19:13:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593185', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:13:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:13:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:13:24] Production.INFO: ==24267== Releasing lock... [2025-03-02 19:13:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:13:24] Production.INFO: 40.25 MB #Memory Used# [2025-03-02 19:14:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:14:04 [end_date_ymd] => 2025-03-02 19:14:04 [RateCDR] => 1 ) [2025-03-02 19: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-03-02 16:14:04' and `end` < '2025-03-02 19: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-03-02 19:14:17] Production.INFO: count ==1533 [2025-03-02 19:14:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:14:04 - End Time 2025-03-02 19:14:04 [2025-03-02 19:14:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593190', 'tblTempUsageDetail_20' ) start [2025-03-02 19:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593190', 'tblTempUsageDetail_20' ) end [2025-03-02 19:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593190', 'tblTempVendorCDR_20' ) start [2025-03-02 19:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593190', 'tblTempVendorCDR_20' ) end [2025-03-02 19:14:17] Production.INFO: ProcessCDR(1,14593190,1,1,2) [2025-03-02 19:14:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593190,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:14:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593190,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:14:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593190,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:14:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593190,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:14:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593190', 'tblTempUsageDetail_20' ) start [2025-03-02 19:14:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593190', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:14:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:14:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:14:24] Production.INFO: ==24368== Releasing lock... [2025-03-02 19:14:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:14:24] Production.INFO: 40.25 MB #Memory Used# [2025-03-02 19:15:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:15:05 [end_date_ymd] => 2025-03-02 19:15:05 [RateCDR] => 1 ) [2025-03-02 19: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-03-02 16:15:05' and `end` < '2025-03-02 19: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-03-02 19:15:17] Production.INFO: count ==1534 [2025-03-02 19:15:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:15:05 - End Time 2025-03-02 19:15:05 [2025-03-02 19:15:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593195', 'tblTempUsageDetail_20' ) start [2025-03-02 19:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593195', 'tblTempUsageDetail_20' ) end [2025-03-02 19:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593195', 'tblTempVendorCDR_20' ) start [2025-03-02 19:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593195', 'tblTempVendorCDR_20' ) end [2025-03-02 19:15:17] Production.INFO: ProcessCDR(1,14593195,1,1,2) [2025-03-02 19:15:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593195,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:15:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593195,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:15:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593195,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:15:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593195,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:15:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593195', 'tblTempUsageDetail_20' ) start [2025-03-02 19:15:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593195', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:15:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:15:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:15:25] Production.INFO: ==24536== Releasing lock... [2025-03-02 19:15:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:15:25] Production.INFO: 40.25 MB #Memory Used# [2025-03-02 19:16:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:16:04 [end_date_ymd] => 2025-03-02 19:16:04 [RateCDR] => 1 ) [2025-03-02 19: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-03-02 16:16:04' and `end` < '2025-03-02 19: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-03-02 19:16:16] Production.INFO: count ==1535 [2025-03-02 19:16:16] Production.ERROR: pbx CDR StartTime 2025-03-02 16:16:04 - End Time 2025-03-02 19:16:04 [2025-03-02 19:16:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593200', 'tblTempUsageDetail_20' ) start [2025-03-02 19:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593200', 'tblTempUsageDetail_20' ) end [2025-03-02 19:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593200', 'tblTempVendorCDR_20' ) start [2025-03-02 19:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593200', 'tblTempVendorCDR_20' ) end [2025-03-02 19:16:16] Production.INFO: ProcessCDR(1,14593200,1,1,2) [2025-03-02 19:16:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593200,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:16:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593200,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:16:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593200,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:16:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593200,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593200', 'tblTempUsageDetail_20' ) start [2025-03-02 19:16:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593200', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:16:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:16:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:16:24] Production.INFO: ==24627== Releasing lock... [2025-03-02 19:16:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:16:24] Production.INFO: 40.25 MB #Memory Used# [2025-03-02 19:17:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:17:04 [end_date_ymd] => 2025-03-02 19:17:04 [RateCDR] => 1 ) [2025-03-02 19: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-03-02 16:17:04' and `end` < '2025-03-02 19: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-03-02 19:17:16] Production.INFO: count ==1539 [2025-03-02 19:17:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:17:04 - End Time 2025-03-02 19:17:04 [2025-03-02 19:17:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593205', 'tblTempUsageDetail_20' ) start [2025-03-02 19:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593205', 'tblTempUsageDetail_20' ) end [2025-03-02 19:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593205', 'tblTempVendorCDR_20' ) start [2025-03-02 19:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593205', 'tblTempVendorCDR_20' ) end [2025-03-02 19:17:17] Production.INFO: ProcessCDR(1,14593205,1,1,2) [2025-03-02 19:17:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593205,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:17:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593205,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:17:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593205,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:17:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593205,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:17:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593205', 'tblTempUsageDetail_20' ) start [2025-03-02 19:17:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593205', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:17:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:17:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:17:24] Production.INFO: ==24726== Releasing lock... [2025-03-02 19:17:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:17:24] Production.INFO: 40.25 MB #Memory Used# [2025-03-02 19:18:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:18:04 [end_date_ymd] => 2025-03-02 19:18:04 [RateCDR] => 1 ) [2025-03-02 19:18: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-03-02 16:18:04' and `end` < '2025-03-02 19:18: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-03-02 19:18:16] Production.INFO: count ==1538 [2025-03-02 19:18:16] Production.ERROR: pbx CDR StartTime 2025-03-02 16:18:04 - End Time 2025-03-02 19:18:04 [2025-03-02 19:18:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593210', 'tblTempUsageDetail_20' ) start [2025-03-02 19:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593210', 'tblTempUsageDetail_20' ) end [2025-03-02 19:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593210', 'tblTempVendorCDR_20' ) start [2025-03-02 19:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593210', 'tblTempVendorCDR_20' ) end [2025-03-02 19:18:16] Production.INFO: ProcessCDR(1,14593210,1,1,2) [2025-03-02 19:18:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593210,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:18:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593210,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:18:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593210,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:18:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593210,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593210', 'tblTempUsageDetail_20' ) start [2025-03-02 19:18:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593210', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:18:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:18:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:18:24] Production.INFO: ==24822== Releasing lock... [2025-03-02 19:18:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:18:24] Production.INFO: 40.25 MB #Memory Used# [2025-03-02 19:19:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:19:04 [end_date_ymd] => 2025-03-02 19:19:04 [RateCDR] => 1 ) [2025-03-02 19: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-03-02 16:19:04' and `end` < '2025-03-02 19: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-03-02 19:19:16] Production.INFO: count ==1542 [2025-03-02 19:19:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:19:04 - End Time 2025-03-02 19:19:04 [2025-03-02 19:19:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593215', 'tblTempUsageDetail_20' ) start [2025-03-02 19:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593215', 'tblTempUsageDetail_20' ) end [2025-03-02 19:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593215', 'tblTempVendorCDR_20' ) start [2025-03-02 19:19:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593215', 'tblTempVendorCDR_20' ) end [2025-03-02 19:19:17] Production.INFO: ProcessCDR(1,14593215,1,1,2) [2025-03-02 19:19:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593215,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:19:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593215,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:19:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593215,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:19:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593215,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:19:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593215', 'tblTempUsageDetail_20' ) start [2025-03-02 19:19:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593215', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:19:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:19:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:19:24] Production.INFO: ==24920== Releasing lock... [2025-03-02 19:19:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:19:24] Production.INFO: 40.25 MB #Memory Used# [2025-03-02 19:20:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:20:05 [end_date_ymd] => 2025-03-02 19:20:05 [RateCDR] => 1 ) [2025-03-02 19: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-03-02 16:20:05' and `end` < '2025-03-02 19: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-03-02 19:20:17] Production.INFO: count ==1541 [2025-03-02 19:20:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:20:05 - End Time 2025-03-02 19:20:05 [2025-03-02 19:20:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593221', 'tblTempUsageDetail_20' ) start [2025-03-02 19:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593221', 'tblTempUsageDetail_20' ) end [2025-03-02 19:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593221', 'tblTempVendorCDR_20' ) start [2025-03-02 19:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593221', 'tblTempVendorCDR_20' ) end [2025-03-02 19:20:17] Production.INFO: ProcessCDR(1,14593221,1,1,2) [2025-03-02 19:20:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593221,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:20:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593221,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:20:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593221,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:20:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593221,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593221', 'tblTempUsageDetail_20' ) start [2025-03-02 19:20:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593221', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:20:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:20:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:20:24] Production.INFO: ==25026== Releasing lock... [2025-03-02 19:20:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:20:24] Production.INFO: 40.5 MB #Memory Used# [2025-03-02 19:21:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:21:04 [end_date_ymd] => 2025-03-02 19:21:04 [RateCDR] => 1 ) [2025-03-02 19:21: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-03-02 16:21:04' and `end` < '2025-03-02 19:21: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-03-02 19:21:16] Production.INFO: count ==1518 [2025-03-02 19:21:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:21:04 - End Time 2025-03-02 19:21:04 [2025-03-02 19:21:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593226', 'tblTempUsageDetail_20' ) start [2025-03-02 19:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593226', 'tblTempUsageDetail_20' ) end [2025-03-02 19:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593226', 'tblTempVendorCDR_20' ) start [2025-03-02 19:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593226', 'tblTempVendorCDR_20' ) end [2025-03-02 19:21:17] Production.INFO: ProcessCDR(1,14593226,1,1,2) [2025-03-02 19:21:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593226,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:21:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593226,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:21:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593226,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:21:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593226,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:21:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593226', 'tblTempUsageDetail_20' ) start [2025-03-02 19:21:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593226', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:21:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:21:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:21:24] Production.INFO: ==25126== Releasing lock... [2025-03-02 19:21:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:21:24] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:22:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:22:04 [end_date_ymd] => 2025-03-02 19:22:04 [RateCDR] => 1 ) [2025-03-02 19: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-03-02 16:22:04' and `end` < '2025-03-02 19: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-03-02 19:22:16] Production.INFO: count ==1523 [2025-03-02 19:22:16] Production.ERROR: pbx CDR StartTime 2025-03-02 16:22:04 - End Time 2025-03-02 19:22:04 [2025-03-02 19:22:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:22:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593231', 'tblTempUsageDetail_20' ) start [2025-03-02 19:22:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593231', 'tblTempUsageDetail_20' ) end [2025-03-02 19:22:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593231', 'tblTempVendorCDR_20' ) start [2025-03-02 19:22:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593231', 'tblTempVendorCDR_20' ) end [2025-03-02 19:22:16] Production.INFO: ProcessCDR(1,14593231,1,1,2) [2025-03-02 19:22:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593231,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:22:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593231,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:22:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593231,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:22:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593231,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593231', 'tblTempUsageDetail_20' ) start [2025-03-02 19:22:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593231', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:22:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:22:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:22:24] Production.INFO: ==25228== Releasing lock... [2025-03-02 19:22:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:22:24] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:23:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:23:05 [end_date_ymd] => 2025-03-02 19:23:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 16:23:05' and `end` < '2025-03-02 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-03-02 19:23:17] Production.INFO: count ==1526 [2025-03-02 19:23:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:23:05 - End Time 2025-03-02 19:23:05 [2025-03-02 19:23:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593236', 'tblTempUsageDetail_20' ) start [2025-03-02 19:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593236', 'tblTempUsageDetail_20' ) end [2025-03-02 19:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593236', 'tblTempVendorCDR_20' ) start [2025-03-02 19:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593236', 'tblTempVendorCDR_20' ) end [2025-03-02 19:23:17] Production.INFO: ProcessCDR(1,14593236,1,1,2) [2025-03-02 19:23:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593236,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:23:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593236,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:23:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593236,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:23:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593236,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:23:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593236', 'tblTempUsageDetail_20' ) start [2025-03-02 19:23:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593236', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:23:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:23:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:23:25] Production.INFO: ==25337== Releasing lock... [2025-03-02 19:23:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:23:25] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:24:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:24:04 [end_date_ymd] => 2025-03-02 19:24:04 [RateCDR] => 1 ) [2025-03-02 19:24: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-03-02 16:24:04' and `end` < '2025-03-02 19:24: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-03-02 19:24:16] Production.INFO: count ==1523 [2025-03-02 19:24:16] Production.ERROR: pbx CDR StartTime 2025-03-02 16:24:04 - End Time 2025-03-02 19:24:04 [2025-03-02 19:24:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:24:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593241', 'tblTempUsageDetail_20' ) start [2025-03-02 19:24:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593241', 'tblTempUsageDetail_20' ) end [2025-03-02 19:24:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593241', 'tblTempVendorCDR_20' ) start [2025-03-02 19:24:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593241', 'tblTempVendorCDR_20' ) end [2025-03-02 19:24:16] Production.INFO: ProcessCDR(1,14593241,1,1,2) [2025-03-02 19:24:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593241,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:24:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593241,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:24:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593241,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:24:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593241,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593241', 'tblTempUsageDetail_20' ) start [2025-03-02 19:24:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593241', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:24:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:24:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:24:24] Production.INFO: ==25433== Releasing lock... [2025-03-02 19:24:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:24:24] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:25:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:25:05 [end_date_ymd] => 2025-03-02 19:25:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 16:25:05' and `end` < '2025-03-02 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-03-02 19:25:17] Production.INFO: count ==1523 [2025-03-02 19:25:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:25:05 - End Time 2025-03-02 19:25:05 [2025-03-02 19:25:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593246', 'tblTempUsageDetail_20' ) start [2025-03-02 19:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593246', 'tblTempUsageDetail_20' ) end [2025-03-02 19:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593246', 'tblTempVendorCDR_20' ) start [2025-03-02 19:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593246', 'tblTempVendorCDR_20' ) end [2025-03-02 19:25:17] Production.INFO: ProcessCDR(1,14593246,1,1,2) [2025-03-02 19:25:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593246,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:25:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593246,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:25:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593246,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:25:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593246,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:25:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593246', 'tblTempUsageDetail_20' ) start [2025-03-02 19:25:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593246', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:25:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:25:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:25:25] Production.INFO: ==25549== Releasing lock... [2025-03-02 19:25:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:25:25] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:26:05 [end_date_ymd] => 2025-03-02 19:26:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 16:26:05' and `end` < '2025-03-02 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-03-02 19:26:17] Production.INFO: count ==1526 [2025-03-02 19:26:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:26:05 - End Time 2025-03-02 19:26:05 [2025-03-02 19:26:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593251', 'tblTempUsageDetail_20' ) start [2025-03-02 19:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593251', 'tblTempUsageDetail_20' ) end [2025-03-02 19:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593251', 'tblTempVendorCDR_20' ) start [2025-03-02 19:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593251', 'tblTempVendorCDR_20' ) end [2025-03-02 19:26:17] Production.INFO: ProcessCDR(1,14593251,1,1,2) [2025-03-02 19:26:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593251,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:26:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593251,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:26:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593251,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:26:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593251,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:26:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593251', 'tblTempUsageDetail_20' ) start [2025-03-02 19:26:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593251', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:26:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:26:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:26:25] Production.INFO: ==25640== Releasing lock... [2025-03-02 19:26:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:26:25] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:27:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:27:05 [end_date_ymd] => 2025-03-02 19:27:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 16:27:05' and `end` < '2025-03-02 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-03-02 19:27:17] Production.INFO: count ==1525 [2025-03-02 19:27:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:27:05 - End Time 2025-03-02 19:27:05 [2025-03-02 19:27:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593256', 'tblTempUsageDetail_20' ) start [2025-03-02 19:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593256', 'tblTempUsageDetail_20' ) end [2025-03-02 19:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593256', 'tblTempVendorCDR_20' ) start [2025-03-02 19:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593256', 'tblTempVendorCDR_20' ) end [2025-03-02 19:27:17] Production.INFO: ProcessCDR(1,14593256,1,1,2) [2025-03-02 19:27:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593256,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:27:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593256,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:27:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593256,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:27:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593256,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:27:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593256', 'tblTempUsageDetail_20' ) start [2025-03-02 19:27:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593256', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:27:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:27:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:27:24] Production.INFO: ==25773== Releasing lock... [2025-03-02 19:27:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:27:24] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:28:05 [end_date_ymd] => 2025-03-02 19:28:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 16:28:05' and `end` < '2025-03-02 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-03-02 19:28:17] Production.INFO: count ==1527 [2025-03-02 19:28:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:28:05 - End Time 2025-03-02 19:28:05 [2025-03-02 19:28:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593261', 'tblTempUsageDetail_20' ) start [2025-03-02 19:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593261', 'tblTempUsageDetail_20' ) end [2025-03-02 19:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593261', 'tblTempVendorCDR_20' ) start [2025-03-02 19:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593261', 'tblTempVendorCDR_20' ) end [2025-03-02 19:28:17] Production.INFO: ProcessCDR(1,14593261,1,1,2) [2025-03-02 19:28:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593261,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:28:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593261,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:28:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593261,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:28:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593261,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:28:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593261', 'tblTempUsageDetail_20' ) start [2025-03-02 19:28:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593261', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:28:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:28:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:28:25] Production.INFO: ==25865== Releasing lock... [2025-03-02 19:28:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:28:25] Production.INFO: 40.25 MB #Memory Used# [2025-03-02 19:29:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:29:04 [end_date_ymd] => 2025-03-02 19:29:04 [RateCDR] => 1 ) [2025-03-02 19: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-03-02 16:29:04' and `end` < '2025-03-02 19: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-03-02 19:29:16] Production.INFO: count ==1532 [2025-03-02 19:29:16] Production.ERROR: pbx CDR StartTime 2025-03-02 16:29:04 - End Time 2025-03-02 19:29:04 [2025-03-02 19:29:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593266', 'tblTempUsageDetail_20' ) start [2025-03-02 19:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593266', 'tblTempUsageDetail_20' ) end [2025-03-02 19:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593266', 'tblTempVendorCDR_20' ) start [2025-03-02 19:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593266', 'tblTempVendorCDR_20' ) end [2025-03-02 19:29:16] Production.INFO: ProcessCDR(1,14593266,1,1,2) [2025-03-02 19:29:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593266,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:29:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593266,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:29:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593266,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:29:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593266,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:29:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593266', 'tblTempUsageDetail_20' ) start [2025-03-02 19:29:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593266', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:29:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:29:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:29:24] Production.INFO: ==25954== Releasing lock... [2025-03-02 19:29:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:29:24] Production.INFO: 40.25 MB #Memory Used# [2025-03-02 19:30:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:30:05 [end_date_ymd] => 2025-03-02 19:30:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 16:30:05' and `end` < '2025-03-02 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-03-02 19:30:17] Production.INFO: count ==1526 [2025-03-02 19:30:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:30:05 - End Time 2025-03-02 19:30:05 [2025-03-02 19:30:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593272', 'tblTempUsageDetail_20' ) start [2025-03-02 19:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593272', 'tblTempUsageDetail_20' ) end [2025-03-02 19:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593272', 'tblTempVendorCDR_20' ) start [2025-03-02 19:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593272', 'tblTempVendorCDR_20' ) end [2025-03-02 19:30:17] Production.INFO: ProcessCDR(1,14593272,1,1,2) [2025-03-02 19:30:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593272,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:30:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593272,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:30:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593272,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:30:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593272,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:30:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593272', 'tblTempUsageDetail_20' ) start [2025-03-02 19:30:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593272', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:30:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:30:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:30:25] Production.INFO: ==26047== Releasing lock... [2025-03-02 19:30:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:30:25] Production.INFO: 40.25 MB #Memory Used# [2025-03-02 19:31:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:31:04 [end_date_ymd] => 2025-03-02 19:31:04 [RateCDR] => 1 ) [2025-03-02 19:31: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-03-02 16:31:04' and `end` < '2025-03-02 19:31: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-03-02 19:31:16] Production.INFO: count ==1525 [2025-03-02 19:31:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:31:04 - End Time 2025-03-02 19:31:04 [2025-03-02 19:31:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593277', 'tblTempUsageDetail_20' ) start [2025-03-02 19:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593277', 'tblTempUsageDetail_20' ) end [2025-03-02 19:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593277', 'tblTempVendorCDR_20' ) start [2025-03-02 19:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593277', 'tblTempVendorCDR_20' ) end [2025-03-02 19:31:17] Production.INFO: ProcessCDR(1,14593277,1,1,2) [2025-03-02 19:31:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593277,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:31:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593277,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:31:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593277,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:31:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593277,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:31:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593277', 'tblTempUsageDetail_20' ) start [2025-03-02 19:31:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593277', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:31:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:31:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:31:24] Production.INFO: ==26156== Releasing lock... [2025-03-02 19:31:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:31:24] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:32:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:32:05 [end_date_ymd] => 2025-03-02 19:32:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 16:32:05' and `end` < '2025-03-02 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-03-02 19:32:17] Production.INFO: count ==1522 [2025-03-02 19:32:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:32:05 - End Time 2025-03-02 19:32:05 [2025-03-02 19:32:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593282', 'tblTempUsageDetail_20' ) start [2025-03-02 19:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593282', 'tblTempUsageDetail_20' ) end [2025-03-02 19:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593282', 'tblTempVendorCDR_20' ) start [2025-03-02 19:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593282', 'tblTempVendorCDR_20' ) end [2025-03-02 19:32:17] Production.INFO: ProcessCDR(1,14593282,1,1,2) [2025-03-02 19:32:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593282,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:32:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593282,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:32:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593282,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:32:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593282,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:32:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593282', 'tblTempUsageDetail_20' ) start [2025-03-02 19:32:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593282', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:32:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:32:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:32:25] Production.INFO: ==26251== Releasing lock... [2025-03-02 19:32:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:32:25] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:33:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:33:04 [end_date_ymd] => 2025-03-02 19:33:04 [RateCDR] => 1 ) [2025-03-02 19:33: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-03-02 16:33:04' and `end` < '2025-03-02 19:33: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-03-02 19:33:16] Production.INFO: count ==1522 [2025-03-02 19:33:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:33:04 - End Time 2025-03-02 19:33:04 [2025-03-02 19:33:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593287', 'tblTempUsageDetail_20' ) start [2025-03-02 19:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593287', 'tblTempUsageDetail_20' ) end [2025-03-02 19:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593287', 'tblTempVendorCDR_20' ) start [2025-03-02 19:33:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593287', 'tblTempVendorCDR_20' ) end [2025-03-02 19:33:17] Production.INFO: ProcessCDR(1,14593287,1,1,2) [2025-03-02 19:33:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593287,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:33:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593287,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:33:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593287,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:33:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593287,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:33:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593287', 'tblTempUsageDetail_20' ) start [2025-03-02 19:33:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593287', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:33:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:33:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:33:24] Production.INFO: ==26343== Releasing lock... [2025-03-02 19:33:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:33:24] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:34:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:34:05 [end_date_ymd] => 2025-03-02 19:34:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 16:34:05' and `end` < '2025-03-02 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-03-02 19:34:17] Production.INFO: count ==1521 [2025-03-02 19:34:18] Production.ERROR: pbx CDR StartTime 2025-03-02 16:34:05 - End Time 2025-03-02 19:34:05 [2025-03-02 19:34:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593292', 'tblTempUsageDetail_20' ) start [2025-03-02 19:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593292', 'tblTempUsageDetail_20' ) end [2025-03-02 19:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593292', 'tblTempVendorCDR_20' ) start [2025-03-02 19:34:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593292', 'tblTempVendorCDR_20' ) end [2025-03-02 19:34:18] Production.INFO: ProcessCDR(1,14593292,1,1,2) [2025-03-02 19:34:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593292,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:34:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593292,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:34:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593292,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:34:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593292,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:34:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593292', 'tblTempUsageDetail_20' ) start [2025-03-02 19:34:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593292', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:34:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:34:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:34:25] Production.INFO: ==26444== Releasing lock... [2025-03-02 19:34:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:34:25] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:35:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:35:04 [end_date_ymd] => 2025-03-02 19:35:04 [RateCDR] => 1 ) [2025-03-02 19: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-03-02 16:35:04' and `end` < '2025-03-02 19: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-03-02 19:35:16] Production.INFO: count ==1517 [2025-03-02 19:35:16] Production.ERROR: pbx CDR StartTime 2025-03-02 16:35:04 - End Time 2025-03-02 19:35:04 [2025-03-02 19:35:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:35:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593297', 'tblTempUsageDetail_20' ) start [2025-03-02 19:35:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593297', 'tblTempUsageDetail_20' ) end [2025-03-02 19:35:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593297', 'tblTempVendorCDR_20' ) start [2025-03-02 19:35:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593297', 'tblTempVendorCDR_20' ) end [2025-03-02 19:35:16] Production.INFO: ProcessCDR(1,14593297,1,1,2) [2025-03-02 19:35:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593297,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:35:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593297,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:35:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593297,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:35:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593297,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:35:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593297', 'tblTempUsageDetail_20' ) start [2025-03-02 19:35:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593297', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:35:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:35:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:35:24] Production.INFO: ==26542== Releasing lock... [2025-03-02 19:35:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:35:24] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:36:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:36:04 [end_date_ymd] => 2025-03-02 19:36:04 [RateCDR] => 1 ) [2025-03-02 19:36: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-03-02 16:36:04' and `end` < '2025-03-02 19:36: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-03-02 19:36:17] Production.INFO: count ==1517 [2025-03-02 19:36:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:36:04 - End Time 2025-03-02 19:36:04 [2025-03-02 19:36:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593302', 'tblTempUsageDetail_20' ) start [2025-03-02 19:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593302', 'tblTempUsageDetail_20' ) end [2025-03-02 19:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593302', 'tblTempVendorCDR_20' ) start [2025-03-02 19:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593302', 'tblTempVendorCDR_20' ) end [2025-03-02 19:36:17] Production.INFO: ProcessCDR(1,14593302,1,1,2) [2025-03-02 19:36:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593302,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:36:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593302,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:36:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593302,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:36:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593302,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:36:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593302', 'tblTempUsageDetail_20' ) start [2025-03-02 19:36:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593302', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:36:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:36:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:36:24] Production.INFO: ==26650== Releasing lock... [2025-03-02 19:36:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:36:24] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:37:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:37:04 [end_date_ymd] => 2025-03-02 19:37:04 [RateCDR] => 1 ) [2025-03-02 19: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-03-02 16:37:04' and `end` < '2025-03-02 19: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-03-02 19:37:16] Production.INFO: count ==1512 [2025-03-02 19:37:16] Production.ERROR: pbx CDR StartTime 2025-03-02 16:37:04 - End Time 2025-03-02 19:37:04 [2025-03-02 19:37:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:37:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593307', 'tblTempUsageDetail_20' ) start [2025-03-02 19:37:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593307', 'tblTempUsageDetail_20' ) end [2025-03-02 19:37:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593307', 'tblTempVendorCDR_20' ) start [2025-03-02 19:37:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593307', 'tblTempVendorCDR_20' ) end [2025-03-02 19:37:16] Production.INFO: ProcessCDR(1,14593307,1,1,2) [2025-03-02 19:37:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593307,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:37:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593307,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:37:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593307,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:37:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593307,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593307', 'tblTempUsageDetail_20' ) start [2025-03-02 19:37:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593307', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:37:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:37:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:37:24] Production.INFO: ==26735== Releasing lock... [2025-03-02 19:37:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:37:24] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:38:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:38:04 [end_date_ymd] => 2025-03-02 19:38:04 [RateCDR] => 1 ) [2025-03-02 19:38: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-03-02 16:38:04' and `end` < '2025-03-02 19:38: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-03-02 19:38:16] Production.INFO: count ==1512 [2025-03-02 19:38:16] Production.ERROR: pbx CDR StartTime 2025-03-02 16:38:04 - End Time 2025-03-02 19:38:04 [2025-03-02 19:38:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593312', 'tblTempUsageDetail_20' ) start [2025-03-02 19:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593312', 'tblTempUsageDetail_20' ) end [2025-03-02 19:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593312', 'tblTempVendorCDR_20' ) start [2025-03-02 19:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593312', 'tblTempVendorCDR_20' ) end [2025-03-02 19:38:17] Production.INFO: ProcessCDR(1,14593312,1,1,2) [2025-03-02 19:38:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593312,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:38:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593312,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:38:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593312,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:38:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593312,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593312', 'tblTempUsageDetail_20' ) start [2025-03-02 19:38:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593312', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:38:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:38:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:38:24] Production.INFO: ==26828== Releasing lock... [2025-03-02 19:38:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:38:24] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:39:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:39:04 [end_date_ymd] => 2025-03-02 19:39:04 [RateCDR] => 1 ) [2025-03-02 19: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-03-02 16:39:04' and `end` < '2025-03-02 19: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-03-02 19:39:16] Production.INFO: count ==1511 [2025-03-02 19:39:16] Production.ERROR: pbx CDR StartTime 2025-03-02 16:39:04 - End Time 2025-03-02 19:39:04 [2025-03-02 19:39:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593317', 'tblTempUsageDetail_20' ) start [2025-03-02 19:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593317', 'tblTempUsageDetail_20' ) end [2025-03-02 19:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593317', 'tblTempVendorCDR_20' ) start [2025-03-02 19:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593317', 'tblTempVendorCDR_20' ) end [2025-03-02 19:39:16] Production.INFO: ProcessCDR(1,14593317,1,1,2) [2025-03-02 19:39:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593317,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:39:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593317,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:39:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593317,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:39:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593317,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:39:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593317', 'tblTempUsageDetail_20' ) start [2025-03-02 19:39:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593317', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:39:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:39:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:39:24] Production.INFO: ==26919== Releasing lock... [2025-03-02 19:39:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:39:24] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:40:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:40:05 [end_date_ymd] => 2025-03-02 19:40:05 [RateCDR] => 1 ) [2025-03-02 19: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-03-02 16:40:05' and `end` < '2025-03-02 19: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-03-02 19:40:17] Production.INFO: count ==1501 [2025-03-02 19:40:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:40:05 - End Time 2025-03-02 19:40:05 [2025-03-02 19:40:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593323', 'tblTempUsageDetail_20' ) start [2025-03-02 19:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593323', 'tblTempUsageDetail_20' ) end [2025-03-02 19:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593323', 'tblTempVendorCDR_20' ) start [2025-03-02 19:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593323', 'tblTempVendorCDR_20' ) end [2025-03-02 19:40:17] Production.INFO: ProcessCDR(1,14593323,1,1,2) [2025-03-02 19:40:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593323,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:40:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593323,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:40:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593323,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:40:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593323,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:40:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593323', 'tblTempUsageDetail_20' ) start [2025-03-02 19:40:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593323', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:40:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:40:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:40:25] Production.INFO: ==27013== Releasing lock... [2025-03-02 19:40:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:40:25] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:41:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:41:04 [end_date_ymd] => 2025-03-02 19:41:04 [RateCDR] => 1 ) [2025-03-02 19: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-03-02 16:41:04' and `end` < '2025-03-02 19: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-03-02 19:41:16] Production.INFO: count ==1499 [2025-03-02 19:41:16] Production.ERROR: pbx CDR StartTime 2025-03-02 16:41:04 - End Time 2025-03-02 19:41:04 [2025-03-02 19:41:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593328', 'tblTempUsageDetail_20' ) start [2025-03-02 19:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593328', 'tblTempUsageDetail_20' ) end [2025-03-02 19:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593328', 'tblTempVendorCDR_20' ) start [2025-03-02 19:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593328', 'tblTempVendorCDR_20' ) end [2025-03-02 19:41:16] Production.INFO: ProcessCDR(1,14593328,1,1,2) [2025-03-02 19:41:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593328,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:41:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593328,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:41:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593328,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:41:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593328,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:41:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593328', 'tblTempUsageDetail_20' ) start [2025-03-02 19:41:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593328', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:41:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:41:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:41:23] Production.INFO: ==27129== Releasing lock... [2025-03-02 19:41:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:41:23] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:42:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:42:04 [end_date_ymd] => 2025-03-02 19:42:04 [RateCDR] => 1 ) [2025-03-02 19: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-03-02 16:42:04' and `end` < '2025-03-02 19: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-03-02 19:42:16] Production.INFO: count ==1498 [2025-03-02 19:42:16] Production.ERROR: pbx CDR StartTime 2025-03-02 16:42:04 - End Time 2025-03-02 19:42:04 [2025-03-02 19:42:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593333', 'tblTempUsageDetail_20' ) start [2025-03-02 19:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593333', 'tblTempUsageDetail_20' ) end [2025-03-02 19:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593333', 'tblTempVendorCDR_20' ) start [2025-03-02 19:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593333', 'tblTempVendorCDR_20' ) end [2025-03-02 19:42:16] Production.INFO: ProcessCDR(1,14593333,1,1,2) [2025-03-02 19:42:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593333,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:42:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593333,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:42:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593333,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:42:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593333,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:42:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593333', 'tblTempUsageDetail_20' ) start [2025-03-02 19:42:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593333', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:42:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:42:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:42:24] Production.INFO: ==27218== Releasing lock... [2025-03-02 19:42:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:42:24] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:43:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:43:04 [end_date_ymd] => 2025-03-02 19:43:04 [RateCDR] => 1 ) [2025-03-02 19:43: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-03-02 16:43:04' and `end` < '2025-03-02 19:43: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-03-02 19:43:16] Production.INFO: count ==1495 [2025-03-02 19:43:16] Production.ERROR: pbx CDR StartTime 2025-03-02 16:43:04 - End Time 2025-03-02 19:43:04 [2025-03-02 19:43:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:43:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593338', 'tblTempUsageDetail_20' ) start [2025-03-02 19:43:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593338', 'tblTempUsageDetail_20' ) end [2025-03-02 19:43:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593338', 'tblTempVendorCDR_20' ) start [2025-03-02 19:43:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593338', 'tblTempVendorCDR_20' ) end [2025-03-02 19:43:16] Production.INFO: ProcessCDR(1,14593338,1,1,2) [2025-03-02 19:43:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593338,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:43:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593338,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:43:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593338,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:43:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593338,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:43:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593338', 'tblTempUsageDetail_20' ) start [2025-03-02 19:43:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593338', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:43:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:43:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:43:24] Production.INFO: ==27351== Releasing lock... [2025-03-02 19:43:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:43:24] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:44:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:44:05 [end_date_ymd] => 2025-03-02 19:44:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 16:44:05' and `end` < '2025-03-02 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-03-02 19:44:17] Production.INFO: count ==1498 [2025-03-02 19:44:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:44:05 - End Time 2025-03-02 19:44:05 [2025-03-02 19:44:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593343', 'tblTempUsageDetail_20' ) start [2025-03-02 19:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593343', 'tblTempUsageDetail_20' ) end [2025-03-02 19:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593343', 'tblTempVendorCDR_20' ) start [2025-03-02 19:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593343', 'tblTempVendorCDR_20' ) end [2025-03-02 19:44:17] Production.INFO: ProcessCDR(1,14593343,1,1,2) [2025-03-02 19:44:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593343,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:44:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593343,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:44:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593343,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:44:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593343,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:44:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593343', 'tblTempUsageDetail_20' ) start [2025-03-02 19:44:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593343', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:44:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:44:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:44:25] Production.INFO: ==27448== Releasing lock... [2025-03-02 19:44:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:44:25] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:45:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:45:04 [end_date_ymd] => 2025-03-02 19:45:04 [RateCDR] => 1 ) [2025-03-02 19: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-03-02 16:45:04' and `end` < '2025-03-02 19: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-03-02 19:45:16] Production.INFO: count ==1496 [2025-03-02 19:45:16] Production.ERROR: pbx CDR StartTime 2025-03-02 16:45:04 - End Time 2025-03-02 19:45:04 [2025-03-02 19:45:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593348', 'tblTempUsageDetail_20' ) start [2025-03-02 19:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593348', 'tblTempUsageDetail_20' ) end [2025-03-02 19:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593348', 'tblTempVendorCDR_20' ) start [2025-03-02 19:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593348', 'tblTempVendorCDR_20' ) end [2025-03-02 19:45:16] Production.INFO: ProcessCDR(1,14593348,1,1,2) [2025-03-02 19:45:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593348,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:45:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593348,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:45:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593348,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:45:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593348,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:45:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593348', 'tblTempUsageDetail_20' ) start [2025-03-02 19:45:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593348', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:45:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:45:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:45:24] Production.INFO: ==27541== Releasing lock... [2025-03-02 19:45:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:45:24] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:46:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:46:04 [end_date_ymd] => 2025-03-02 19:46:04 [RateCDR] => 1 ) [2025-03-02 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-03-02 16:46:04' and `end` < '2025-03-02 19: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-03-02 19:46:17] Production.INFO: count ==1492 [2025-03-02 19:46:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:46:04 - End Time 2025-03-02 19:46:04 [2025-03-02 19:46:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593353', 'tblTempUsageDetail_20' ) start [2025-03-02 19:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593353', 'tblTempUsageDetail_20' ) end [2025-03-02 19:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593353', 'tblTempVendorCDR_20' ) start [2025-03-02 19:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593353', 'tblTempVendorCDR_20' ) end [2025-03-02 19:46:17] Production.INFO: ProcessCDR(1,14593353,1,1,2) [2025-03-02 19:46:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593353,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:46:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593353,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:46:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593353,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:46:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593353,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:46:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593353', 'tblTempUsageDetail_20' ) start [2025-03-02 19:46:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593353', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:46:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:46:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:46:24] Production.INFO: ==27629== Releasing lock... [2025-03-02 19:46:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:46:24] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:47:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:47:05 [end_date_ymd] => 2025-03-02 19:47:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 16:47:05' and `end` < '2025-03-02 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-03-02 19:47:17] Production.INFO: count ==1484 [2025-03-02 19:47:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:47:05 - End Time 2025-03-02 19:47:05 [2025-03-02 19:47:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593358', 'tblTempUsageDetail_20' ) start [2025-03-02 19:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593358', 'tblTempUsageDetail_20' ) end [2025-03-02 19:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593358', 'tblTempVendorCDR_20' ) start [2025-03-02 19:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593358', 'tblTempVendorCDR_20' ) end [2025-03-02 19:47:17] Production.INFO: ProcessCDR(1,14593358,1,1,2) [2025-03-02 19:47:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593358,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:47:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593358,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:47:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593358,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:47:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593358,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:47:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593358', 'tblTempUsageDetail_20' ) start [2025-03-02 19:47:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593358', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:47:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:47:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:47:25] Production.INFO: ==27727== Releasing lock... [2025-03-02 19:47:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:47:25] Production.INFO: 39.75 MB #Memory Used# [2025-03-02 19:48:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:48:04 [end_date_ymd] => 2025-03-02 19:48:04 [RateCDR] => 1 ) [2025-03-02 19: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-03-02 16:48:04' and `end` < '2025-03-02 19: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-03-02 19:48:16] Production.INFO: count ==1480 [2025-03-02 19:48:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:48:04 - End Time 2025-03-02 19:48:04 [2025-03-02 19:48:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593363', 'tblTempUsageDetail_20' ) start [2025-03-02 19:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593363', 'tblTempUsageDetail_20' ) end [2025-03-02 19:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593363', 'tblTempVendorCDR_20' ) start [2025-03-02 19:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593363', 'tblTempVendorCDR_20' ) end [2025-03-02 19:48:17] Production.INFO: ProcessCDR(1,14593363,1,1,2) [2025-03-02 19:48:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593363,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:48:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593363,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:48:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593363,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:48:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593363,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:48:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593363', 'tblTempUsageDetail_20' ) start [2025-03-02 19:48:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593363', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:48:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:48:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:48:24] Production.INFO: ==27855== Releasing lock... [2025-03-02 19:48:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:48:24] Production.INFO: 39.75 MB #Memory Used# [2025-03-02 19:49:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:49:04 [end_date_ymd] => 2025-03-02 19:49:04 [RateCDR] => 1 ) [2025-03-02 19:49: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-03-02 16:49:04' and `end` < '2025-03-02 19:49: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-03-02 19:49:16] Production.INFO: count ==1478 [2025-03-02 19:49:16] Production.ERROR: pbx CDR StartTime 2025-03-02 16:49:04 - End Time 2025-03-02 19:49:04 [2025-03-02 19:49:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593368', 'tblTempUsageDetail_20' ) start [2025-03-02 19:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593368', 'tblTempUsageDetail_20' ) end [2025-03-02 19:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593368', 'tblTempVendorCDR_20' ) start [2025-03-02 19:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593368', 'tblTempVendorCDR_20' ) end [2025-03-02 19:49:16] Production.INFO: ProcessCDR(1,14593368,1,1,2) [2025-03-02 19:49:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593368,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:49:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593368,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:49:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593368,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:49:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593368,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:49:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593368', 'tblTempUsageDetail_20' ) start [2025-03-02 19:49:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593368', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:49:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:49:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:49:24] Production.INFO: ==27958== Releasing lock... [2025-03-02 19:49:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:49:24] Production.INFO: 39.75 MB #Memory Used# [2025-03-02 19:50:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:50:04 [end_date_ymd] => 2025-03-02 19:50:04 [RateCDR] => 1 ) [2025-03-02 19:50: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-03-02 16:50:04' and `end` < '2025-03-02 19:50: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-03-02 19:50:17] Production.INFO: count ==1486 [2025-03-02 19:50:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:50:04 - End Time 2025-03-02 19:50:04 [2025-03-02 19:50:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593373', 'tblTempUsageDetail_20' ) start [2025-03-02 19:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593373', 'tblTempUsageDetail_20' ) end [2025-03-02 19:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593373', 'tblTempVendorCDR_20' ) start [2025-03-02 19:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593373', 'tblTempVendorCDR_20' ) end [2025-03-02 19:50:17] Production.INFO: ProcessCDR(1,14593373,1,1,2) [2025-03-02 19:50:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593373,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:50:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593373,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:50:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593373,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:50:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593373,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:50:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593373', 'tblTempUsageDetail_20' ) start [2025-03-02 19:50:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593373', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:50:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:50:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:50:24] Production.INFO: ==28048== Releasing lock... [2025-03-02 19:50:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:50:24] Production.INFO: 39.75 MB #Memory Used# [2025-03-02 19:51:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:51:04 [end_date_ymd] => 2025-03-02 19:51:04 [RateCDR] => 1 ) [2025-03-02 19: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-03-02 16:51:04' and `end` < '2025-03-02 19: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-03-02 19:51:17] Production.INFO: count ==1479 [2025-03-02 19:51:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:51:04 - End Time 2025-03-02 19:51:04 [2025-03-02 19:51:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593379', 'tblTempUsageDetail_20' ) start [2025-03-02 19:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593379', 'tblTempUsageDetail_20' ) end [2025-03-02 19:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593379', 'tblTempVendorCDR_20' ) start [2025-03-02 19:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593379', 'tblTempVendorCDR_20' ) end [2025-03-02 19:51:17] Production.INFO: ProcessCDR(1,14593379,1,1,2) [2025-03-02 19:51:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593379,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:51:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593379,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:51:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593379,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:51:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593379,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:51:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593379', 'tblTempUsageDetail_20' ) start [2025-03-02 19:51:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593379', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:51:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:51:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:51:24] Production.INFO: ==28141== Releasing lock... [2025-03-02 19:51:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:51:24] Production.INFO: 39.75 MB #Memory Used# [2025-03-02 19:52:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:52:04 [end_date_ymd] => 2025-03-02 19:52:04 [RateCDR] => 1 ) [2025-03-02 19:52: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-03-02 16:52:04' and `end` < '2025-03-02 19:52: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-03-02 19:52:16] Production.INFO: count ==1474 [2025-03-02 19:52:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:52:04 - End Time 2025-03-02 19:52:04 [2025-03-02 19:52:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593384', 'tblTempUsageDetail_20' ) start [2025-03-02 19:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593384', 'tblTempUsageDetail_20' ) end [2025-03-02 19:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593384', 'tblTempVendorCDR_20' ) start [2025-03-02 19:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593384', 'tblTempVendorCDR_20' ) end [2025-03-02 19:52:17] Production.INFO: ProcessCDR(1,14593384,1,1,2) [2025-03-02 19:52:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593384,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:52:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593384,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:52:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593384,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:52:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593384,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:52:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593384', 'tblTempUsageDetail_20' ) start [2025-03-02 19:52:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593384', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:52:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:52:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:52:24] Production.INFO: ==28220== Releasing lock... [2025-03-02 19:52:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:52:24] Production.INFO: 39.75 MB #Memory Used# [2025-03-02 19:53:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:53:04 [end_date_ymd] => 2025-03-02 19:53:04 [RateCDR] => 1 ) [2025-03-02 19: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-03-02 16:53:04' and `end` < '2025-03-02 19: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-03-02 19:53:16] Production.INFO: count ==1475 [2025-03-02 19:53:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:53:04 - End Time 2025-03-02 19:53:04 [2025-03-02 19:53:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593389', 'tblTempUsageDetail_20' ) start [2025-03-02 19:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593389', 'tblTempUsageDetail_20' ) end [2025-03-02 19:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593389', 'tblTempVendorCDR_20' ) start [2025-03-02 19:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593389', 'tblTempVendorCDR_20' ) end [2025-03-02 19:53:17] Production.INFO: ProcessCDR(1,14593389,1,1,2) [2025-03-02 19:53:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593389,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:53:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593389,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:53:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593389,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:53:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593389,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:53:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593389', 'tblTempUsageDetail_20' ) start [2025-03-02 19:53:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593389', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:53:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:53:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:53:24] Production.INFO: ==28318== Releasing lock... [2025-03-02 19:53:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:53:24] Production.INFO: 40 MB #Memory Used# [2025-03-02 19:54:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:54:04 [end_date_ymd] => 2025-03-02 19:54:04 [RateCDR] => 1 ) [2025-03-02 19:54: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-03-02 16:54:04' and `end` < '2025-03-02 19:54: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-03-02 19:54:16] Production.INFO: count ==1476 [2025-03-02 19:54:16] Production.ERROR: pbx CDR StartTime 2025-03-02 16:54:04 - End Time 2025-03-02 19:54:04 [2025-03-02 19:54:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:54:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593394', 'tblTempUsageDetail_20' ) start [2025-03-02 19:54:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593394', 'tblTempUsageDetail_20' ) end [2025-03-02 19:54:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593394', 'tblTempVendorCDR_20' ) start [2025-03-02 19:54:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593394', 'tblTempVendorCDR_20' ) end [2025-03-02 19:54:16] Production.INFO: ProcessCDR(1,14593394,1,1,2) [2025-03-02 19:54:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593394,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:54:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593394,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:54:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593394,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:54:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593394,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:54:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593394', 'tblTempUsageDetail_20' ) start [2025-03-02 19:54:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593394', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:54:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:54:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:54:23] Production.INFO: ==28414== Releasing lock... [2025-03-02 19:54:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:54:23] Production.INFO: 39.75 MB #Memory Used# [2025-03-02 19:55:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:55:04 [end_date_ymd] => 2025-03-02 19:55:04 [RateCDR] => 1 ) [2025-03-02 19:55: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-03-02 16:55:04' and `end` < '2025-03-02 19:55: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-03-02 19:55:16] Production.INFO: count ==1473 [2025-03-02 19:55:16] Production.ERROR: pbx CDR StartTime 2025-03-02 16:55:04 - End Time 2025-03-02 19:55:04 [2025-03-02 19:55:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593399', 'tblTempUsageDetail_20' ) start [2025-03-02 19:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593399', 'tblTempUsageDetail_20' ) end [2025-03-02 19:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593399', 'tblTempVendorCDR_20' ) start [2025-03-02 19:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593399', 'tblTempVendorCDR_20' ) end [2025-03-02 19:55:16] Production.INFO: ProcessCDR(1,14593399,1,1,2) [2025-03-02 19:55:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593399,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:55:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593399,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:55:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593399,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:55:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593399,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:55:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593399', 'tblTempUsageDetail_20' ) start [2025-03-02 19:55:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593399', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:55:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:55:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:55:24] Production.INFO: ==28498== Releasing lock... [2025-03-02 19:55:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:55:24] Production.INFO: 39.75 MB #Memory Used# [2025-03-02 19:56:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:56:04 [end_date_ymd] => 2025-03-02 19:56:04 [RateCDR] => 1 ) [2025-03-02 19:56: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-03-02 16:56:04' and `end` < '2025-03-02 19:56: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-03-02 19:56:16] Production.INFO: count ==1466 [2025-03-02 19:56:16] Production.ERROR: pbx CDR StartTime 2025-03-02 16:56:04 - End Time 2025-03-02 19:56:04 [2025-03-02 19:56:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593404', 'tblTempUsageDetail_20' ) start [2025-03-02 19:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593404', 'tblTempUsageDetail_20' ) end [2025-03-02 19:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593404', 'tblTempVendorCDR_20' ) start [2025-03-02 19:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593404', 'tblTempVendorCDR_20' ) end [2025-03-02 19:56:16] Production.INFO: ProcessCDR(1,14593404,1,1,2) [2025-03-02 19:56:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593404,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:56:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593404,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:56:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593404,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:56:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593404,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:56:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593404', 'tblTempUsageDetail_20' ) start [2025-03-02 19:56:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593404', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:56:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:56:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:56:24] Production.INFO: ==28588== Releasing lock... [2025-03-02 19:56:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:56:24] Production.INFO: 39.75 MB #Memory Used# [2025-03-02 19:57:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:57:04 [end_date_ymd] => 2025-03-02 19:57:04 [RateCDR] => 1 ) [2025-03-02 19:57: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-03-02 16:57:04' and `end` < '2025-03-02 19:57: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-03-02 19:57:16] Production.INFO: count ==1467 [2025-03-02 19:57:17] Production.ERROR: pbx CDR StartTime 2025-03-02 16:57:04 - End Time 2025-03-02 19:57:04 [2025-03-02 19:57:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593409', 'tblTempUsageDetail_20' ) start [2025-03-02 19:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593409', 'tblTempUsageDetail_20' ) end [2025-03-02 19:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593409', 'tblTempVendorCDR_20' ) start [2025-03-02 19:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593409', 'tblTempVendorCDR_20' ) end [2025-03-02 19:57:17] Production.INFO: ProcessCDR(1,14593409,1,1,2) [2025-03-02 19:57:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593409,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:57:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593409,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:57:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593409,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:57:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593409,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:57:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593409', 'tblTempUsageDetail_20' ) start [2025-03-02 19:57:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593409', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:57:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:57:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:57:24] Production.INFO: ==28695== Releasing lock... [2025-03-02 19:57:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:57:24] Production.INFO: 39.75 MB #Memory Used# [2025-03-02 19:58:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:58:04 [end_date_ymd] => 2025-03-02 19:58:04 [RateCDR] => 1 ) [2025-03-02 19: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-03-02 16:58:04' and `end` < '2025-03-02 19: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-03-02 19:58:16] Production.INFO: count ==1466 [2025-03-02 19:58:16] Production.ERROR: pbx CDR StartTime 2025-03-02 16:58:04 - End Time 2025-03-02 19:58:04 [2025-03-02 19:58:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593414', 'tblTempUsageDetail_20' ) start [2025-03-02 19:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593414', 'tblTempUsageDetail_20' ) end [2025-03-02 19:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593414', 'tblTempVendorCDR_20' ) start [2025-03-02 19:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593414', 'tblTempVendorCDR_20' ) end [2025-03-02 19:58:16] Production.INFO: ProcessCDR(1,14593414,1,1,2) [2025-03-02 19:58:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593414,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:58:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593414,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:58:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593414,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:58:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593414,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:58:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593414', 'tblTempUsageDetail_20' ) start [2025-03-02 19:58:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593414', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:58:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:58:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:58:24] Production.INFO: ==28825== Releasing lock... [2025-03-02 19:58:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:58:24] Production.INFO: 39.75 MB #Memory Used# [2025-03-02 19:59:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 16:59:04 [end_date_ymd] => 2025-03-02 19:59:04 [RateCDR] => 1 ) [2025-03-02 19: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-03-02 16:59:04' and `end` < '2025-03-02 19: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-03-02 19:59:16] Production.INFO: count ==1465 [2025-03-02 19:59:16] Production.ERROR: pbx CDR StartTime 2025-03-02 16:59:04 - End Time 2025-03-02 19:59:04 [2025-03-02 19:59:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 19:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593419', 'tblTempUsageDetail_20' ) start [2025-03-02 19:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593419', 'tblTempUsageDetail_20' ) end [2025-03-02 19:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593419', 'tblTempVendorCDR_20' ) start [2025-03-02 19:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593419', 'tblTempVendorCDR_20' ) end [2025-03-02 19:59:16] Production.INFO: ProcessCDR(1,14593419,1,1,2) [2025-03-02 19:59:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593419,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:59:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593419,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 19:59:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593419,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:59:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593419,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 19:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593419', 'tblTempUsageDetail_20' ) start [2025-03-02 19:59:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593419', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 19:59:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 19:59:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 19:59:24] Production.INFO: ==28921== Releasing lock... [2025-03-02 19:59:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 19:59:24] Production.INFO: 39.75 MB #Memory Used# [2025-03-02 20:00:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:00:05 [end_date_ymd] => 2025-03-02 20:00:05 [RateCDR] => 1 ) [2025-03-02 20: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-03-02 17:00:05' and `end` < '2025-03-02 20: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-03-02 20:00:17] Production.INFO: count ==1462 [2025-03-02 20:00:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:00:05 - End Time 2025-03-02 20:00:05 [2025-03-02 20:00:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593424', 'tblTempUsageDetail_20' ) start [2025-03-02 20:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593424', 'tblTempUsageDetail_20' ) end [2025-03-02 20:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593424', 'tblTempVendorCDR_20' ) start [2025-03-02 20:00:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593424', 'tblTempVendorCDR_20' ) end [2025-03-02 20:00:18] Production.INFO: ProcessCDR(1,14593424,1,1,2) [2025-03-02 20:00:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593424,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:00:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593424,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:00:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593424,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:00:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593424,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:00:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593424', 'tblTempUsageDetail_20' ) start [2025-03-02 20:00:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593424', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:00:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:00:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:00:25] Production.INFO: ==29016== Releasing lock... [2025-03-02 20:00:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:00:25] Production.INFO: 39.75 MB #Memory Used# [2025-03-02 20:01:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:01:04 [end_date_ymd] => 2025-03-02 20:01:04 [RateCDR] => 1 ) [2025-03-02 20:01: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-03-02 17:01:04' and `end` < '2025-03-02 20:01: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-03-02 20:01:16] Production.INFO: count ==1443 [2025-03-02 20:01:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:01:04 - End Time 2025-03-02 20:01:04 [2025-03-02 20:01:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593430', 'tblTempUsageDetail_20' ) start [2025-03-02 20:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593430', 'tblTempUsageDetail_20' ) end [2025-03-02 20:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593430', 'tblTempVendorCDR_20' ) start [2025-03-02 20:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593430', 'tblTempVendorCDR_20' ) end [2025-03-02 20:01:16] Production.INFO: ProcessCDR(1,14593430,1,1,2) [2025-03-02 20:01:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593430,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:01:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593430,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:01:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593430,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:01:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593430,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593430', 'tblTempUsageDetail_20' ) start [2025-03-02 20:01:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593430', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:01:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:01:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:01:24] Production.INFO: ==29157== Releasing lock... [2025-03-02 20:01:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:01:24] Production.INFO: 39.5 MB #Memory Used# [2025-03-02 20:02:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:02:04 [end_date_ymd] => 2025-03-02 20:02:04 [RateCDR] => 1 ) [2025-03-02 20:02: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-03-02 17:02:04' and `end` < '2025-03-02 20:02: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-03-02 20:02:16] Production.INFO: count ==1446 [2025-03-02 20:02:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:02:04 - End Time 2025-03-02 20:02:04 [2025-03-02 20:02:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593435', 'tblTempUsageDetail_20' ) start [2025-03-02 20:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593435', 'tblTempUsageDetail_20' ) end [2025-03-02 20:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593435', 'tblTempVendorCDR_20' ) start [2025-03-02 20:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593435', 'tblTempVendorCDR_20' ) end [2025-03-02 20:02:17] Production.INFO: ProcessCDR(1,14593435,1,1,2) [2025-03-02 20:02:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593435,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:02:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593435,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:02:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593435,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:02:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593435,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:02:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593435', 'tblTempUsageDetail_20' ) start [2025-03-02 20:02:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593435', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:02:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:02:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:02:24] Production.INFO: ==29231== Releasing lock... [2025-03-02 20:02:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:02:24] Production.INFO: 39.5 MB #Memory Used# [2025-03-02 20:03:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:03:04 [end_date_ymd] => 2025-03-02 20:03:04 [RateCDR] => 1 ) [2025-03-02 20: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-03-02 17:03:04' and `end` < '2025-03-02 20: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-03-02 20:03:17] Production.INFO: count ==1447 [2025-03-02 20:03:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:03:04 - End Time 2025-03-02 20:03:04 [2025-03-02 20:03:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593440', 'tblTempUsageDetail_20' ) start [2025-03-02 20:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593440', 'tblTempUsageDetail_20' ) end [2025-03-02 20:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593440', 'tblTempVendorCDR_20' ) start [2025-03-02 20:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593440', 'tblTempVendorCDR_20' ) end [2025-03-02 20:03:17] Production.INFO: ProcessCDR(1,14593440,1,1,2) [2025-03-02 20:03:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593440,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:03:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593440,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:03:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593440,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:03:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593440,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:03:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593440', 'tblTempUsageDetail_20' ) start [2025-03-02 20:03:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593440', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:03:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:03:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:03:24] Production.INFO: ==29311== Releasing lock... [2025-03-02 20:03:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:03:24] Production.INFO: 39.5 MB #Memory Used# [2025-03-02 20:04:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:04:05 [end_date_ymd] => 2025-03-02 20:04:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:04:05' and `end` < '2025-03-02 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-03-02 20:04:17] Production.INFO: count ==1444 [2025-03-02 20:04:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:04:05 - End Time 2025-03-02 20:04:05 [2025-03-02 20:04:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593445', 'tblTempUsageDetail_20' ) start [2025-03-02 20:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593445', 'tblTempUsageDetail_20' ) end [2025-03-02 20:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593445', 'tblTempVendorCDR_20' ) start [2025-03-02 20:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593445', 'tblTempVendorCDR_20' ) end [2025-03-02 20:04:17] Production.INFO: ProcessCDR(1,14593445,1,1,2) [2025-03-02 20:04:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593445,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:04:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593445,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:04:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593445,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:04:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593445,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:04:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593445', 'tblTempUsageDetail_20' ) start [2025-03-02 20:04:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593445', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:04:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:04:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:04:24] Production.INFO: ==29401== Releasing lock... [2025-03-02 20:04:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:04:24] Production.INFO: 39.5 MB #Memory Used# [2025-03-02 20:05:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:05:04 [end_date_ymd] => 2025-03-02 20:05:04 [RateCDR] => 1 ) [2025-03-02 20:05: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-03-02 17:05:04' and `end` < '2025-03-02 20: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-03-02 20:05:16] Production.INFO: count ==1444 [2025-03-02 20:05:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:05:04 - End Time 2025-03-02 20:05:04 [2025-03-02 20:05:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593450', 'tblTempUsageDetail_20' ) start [2025-03-02 20:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593450', 'tblTempUsageDetail_20' ) end [2025-03-02 20:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593450', 'tblTempVendorCDR_20' ) start [2025-03-02 20:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593450', 'tblTempVendorCDR_20' ) end [2025-03-02 20:05:16] Production.INFO: ProcessCDR(1,14593450,1,1,2) [2025-03-02 20:05:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593450,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:05:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593450,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:05:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593450,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:05:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593450,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:05:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593450', 'tblTempUsageDetail_20' ) start [2025-03-02 20:05:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593450', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:05:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:05:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:05:24] Production.INFO: ==29492== Releasing lock... [2025-03-02 20:05:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:05:24] Production.INFO: 39.5 MB #Memory Used# [2025-03-02 20:06:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:06:04 [end_date_ymd] => 2025-03-02 20:06:04 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:06:04' and `end` < '2025-03-02 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-03-02 20:06:16] Production.INFO: count ==1443 [2025-03-02 20:06:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:06:04 - End Time 2025-03-02 20:06:04 [2025-03-02 20:06:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593455', 'tblTempUsageDetail_20' ) start [2025-03-02 20:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593455', 'tblTempUsageDetail_20' ) end [2025-03-02 20:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593455', 'tblTempVendorCDR_20' ) start [2025-03-02 20:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593455', 'tblTempVendorCDR_20' ) end [2025-03-02 20:06:17] Production.INFO: ProcessCDR(1,14593455,1,1,2) [2025-03-02 20:06:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593455,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:06:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593455,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:06:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593455,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:06:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593455,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:06:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593455', 'tblTempUsageDetail_20' ) start [2025-03-02 20:06:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593455', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:06:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:06:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:06:24] Production.INFO: ==29591== Releasing lock... [2025-03-02 20:06:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:06:24] Production.INFO: 39.5 MB #Memory Used# [2025-03-02 20:07:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:07:04 [end_date_ymd] => 2025-03-02 20:07:04 [RateCDR] => 1 ) [2025-03-02 20: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-03-02 17:07:04' and `end` < '2025-03-02 20: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-03-02 20:07:16] Production.INFO: count ==1444 [2025-03-02 20:07:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:07:04 - End Time 2025-03-02 20:07:04 [2025-03-02 20:07:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:07:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593460', 'tblTempUsageDetail_20' ) start [2025-03-02 20:07:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593460', 'tblTempUsageDetail_20' ) end [2025-03-02 20:07:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593460', 'tblTempVendorCDR_20' ) start [2025-03-02 20:07:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593460', 'tblTempVendorCDR_20' ) end [2025-03-02 20:07:16] Production.INFO: ProcessCDR(1,14593460,1,1,2) [2025-03-02 20:07:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593460,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:07:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593460,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:07:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593460,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:07:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593460,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:07:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593460', 'tblTempUsageDetail_20' ) start [2025-03-02 20:07:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593460', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:07:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:07:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:07:23] Production.INFO: ==29680== Releasing lock... [2025-03-02 20:07:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:07:23] Production.INFO: 39.5 MB #Memory Used# [2025-03-02 20:08:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:08:04 [end_date_ymd] => 2025-03-02 20:08:04 [RateCDR] => 1 ) [2025-03-02 20:08: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-03-02 17:08:04' and `end` < '2025-03-02 20:08: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-03-02 20:08:16] Production.INFO: count ==1448 [2025-03-02 20:08:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:08:04 - End Time 2025-03-02 20:08:04 [2025-03-02 20:08:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593465', 'tblTempUsageDetail_20' ) start [2025-03-02 20:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593465', 'tblTempUsageDetail_20' ) end [2025-03-02 20:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593465', 'tblTempVendorCDR_20' ) start [2025-03-02 20:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593465', 'tblTempVendorCDR_20' ) end [2025-03-02 20:08:17] Production.INFO: ProcessCDR(1,14593465,1,1,2) [2025-03-02 20:08:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593465,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:08:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593465,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:08:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593465,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:08:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593465,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:08:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593465', 'tblTempUsageDetail_20' ) start [2025-03-02 20:08:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593465', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:08:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:08:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:08:24] Production.INFO: ==29772== Releasing lock... [2025-03-02 20:08:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:08:24] Production.INFO: 39.5 MB #Memory Used# [2025-03-02 20:09:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:09:04 [end_date_ymd] => 2025-03-02 20:09:04 [RateCDR] => 1 ) [2025-03-02 20:09: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-03-02 17:09:04' and `end` < '2025-03-02 20:09: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-03-02 20:09:16] Production.INFO: count ==1446 [2025-03-02 20:09:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:09:04 - End Time 2025-03-02 20:09:04 [2025-03-02 20:09:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593470', 'tblTempUsageDetail_20' ) start [2025-03-02 20:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593470', 'tblTempUsageDetail_20' ) end [2025-03-02 20:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593470', 'tblTempVendorCDR_20' ) start [2025-03-02 20:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593470', 'tblTempVendorCDR_20' ) end [2025-03-02 20:09:16] Production.INFO: ProcessCDR(1,14593470,1,1,2) [2025-03-02 20:09:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593470,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:09:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593470,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:09:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593470,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:09:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593470,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:09:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593470', 'tblTempUsageDetail_20' ) start [2025-03-02 20:09:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593470', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:09:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:09:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:09:23] Production.INFO: ==29857== Releasing lock... [2025-03-02 20:09:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:09:23] Production.INFO: 39.5 MB #Memory Used# [2025-03-02 20:10:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:10:05 [end_date_ymd] => 2025-03-02 20:10:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:10:05' and `end` < '2025-03-02 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-03-02 20:10:17] Production.INFO: count ==1444 [2025-03-02 20:10:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:10:05 - End Time 2025-03-02 20:10:05 [2025-03-02 20:10:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593476', 'tblTempUsageDetail_20' ) start [2025-03-02 20:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593476', 'tblTempUsageDetail_20' ) end [2025-03-02 20:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593476', 'tblTempVendorCDR_20' ) start [2025-03-02 20:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593476', 'tblTempVendorCDR_20' ) end [2025-03-02 20:10:17] Production.INFO: ProcessCDR(1,14593476,1,1,2) [2025-03-02 20:10:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593476,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:10:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593476,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:10:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593476,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:10:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593476,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:10:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593476', 'tblTempUsageDetail_20' ) start [2025-03-02 20:10:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593476', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:10:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:10:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:10:24] Production.INFO: ==29948== Releasing lock... [2025-03-02 20:10:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:10:24] Production.INFO: 39.5 MB #Memory Used# [2025-03-02 20:11:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:11:04 [end_date_ymd] => 2025-03-02 20:11:04 [RateCDR] => 1 ) [2025-03-02 20: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-03-02 17:11:04' and `end` < '2025-03-02 20: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-03-02 20:11:16] Production.INFO: count ==1419 [2025-03-02 20:11:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:11:04 - End Time 2025-03-02 20:11:04 [2025-03-02 20:11:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593481', 'tblTempUsageDetail_20' ) start [2025-03-02 20:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593481', 'tblTempUsageDetail_20' ) end [2025-03-02 20:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593481', 'tblTempVendorCDR_20' ) start [2025-03-02 20:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593481', 'tblTempVendorCDR_20' ) end [2025-03-02 20:11:17] Production.INFO: ProcessCDR(1,14593481,1,1,2) [2025-03-02 20:11:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593481,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:11:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593481,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:11:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593481,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:11:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593481,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:11:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593481', 'tblTempUsageDetail_20' ) start [2025-03-02 20:11:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593481', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:11:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:11:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:11:24] Production.INFO: ==30046== Releasing lock... [2025-03-02 20:11:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:11:24] Production.INFO: 39.25 MB #Memory Used# [2025-03-02 20:12:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:12:04 [end_date_ymd] => 2025-03-02 20:12:04 [RateCDR] => 1 ) [2025-03-02 20:12: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-03-02 17:12:04' and `end` < '2025-03-02 20:12: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-03-02 20:12:16] Production.INFO: count ==1415 [2025-03-02 20:12:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:12:04 - End Time 2025-03-02 20:12:04 [2025-03-02 20:12:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593486', 'tblTempUsageDetail_20' ) start [2025-03-02 20:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593486', 'tblTempUsageDetail_20' ) end [2025-03-02 20:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593486', 'tblTempVendorCDR_20' ) start [2025-03-02 20:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593486', 'tblTempVendorCDR_20' ) end [2025-03-02 20:12:17] Production.INFO: ProcessCDR(1,14593486,1,1,2) [2025-03-02 20:12:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593486,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:12:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593486,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:12:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593486,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:12:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593486,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:12:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593486', 'tblTempUsageDetail_20' ) start [2025-03-02 20:12:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593486', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:12:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:12:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:12:24] Production.INFO: ==30136== Releasing lock... [2025-03-02 20:12:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:12:24] Production.INFO: 39.25 MB #Memory Used# [2025-03-02 20:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:13:05 [end_date_ymd] => 2025-03-02 20:13:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:13:05' and `end` < '2025-03-02 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-03-02 20:13:17] Production.INFO: count ==1410 [2025-03-02 20:13:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:13:05 - End Time 2025-03-02 20:13:05 [2025-03-02 20:13:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593491', 'tblTempUsageDetail_20' ) start [2025-03-02 20:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593491', 'tblTempUsageDetail_20' ) end [2025-03-02 20:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593491', 'tblTempVendorCDR_20' ) start [2025-03-02 20:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593491', 'tblTempVendorCDR_20' ) end [2025-03-02 20:13:17] Production.INFO: ProcessCDR(1,14593491,1,1,2) [2025-03-02 20:13:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593491,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:13:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593491,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:13:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593491,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:13:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593491,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:13:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593491', 'tblTempUsageDetail_20' ) start [2025-03-02 20:13:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593491', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:13:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:13:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:13:25] Production.INFO: ==30233== Releasing lock... [2025-03-02 20:13:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:13:25] Production.INFO: 39.25 MB #Memory Used# [2025-03-02 20:14:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:14:04 [end_date_ymd] => 2025-03-02 20:14:04 [RateCDR] => 1 ) [2025-03-02 20: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-03-02 17:14:04' and `end` < '2025-03-02 20: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-03-02 20:14:16] Production.INFO: count ==1410 [2025-03-02 20:14:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:14:04 - End Time 2025-03-02 20:14:04 [2025-03-02 20:14:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593496', 'tblTempUsageDetail_20' ) start [2025-03-02 20:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593496', 'tblTempUsageDetail_20' ) end [2025-03-02 20:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593496', 'tblTempVendorCDR_20' ) start [2025-03-02 20:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593496', 'tblTempVendorCDR_20' ) end [2025-03-02 20:14:17] Production.INFO: ProcessCDR(1,14593496,1,1,2) [2025-03-02 20:14:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593496,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:14:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593496,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:14:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593496,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:14:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593496,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:14:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593496', 'tblTempUsageDetail_20' ) start [2025-03-02 20:14:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593496', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:14:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:14:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:14:24] Production.INFO: ==30373== Releasing lock... [2025-03-02 20:14:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:14:24] Production.INFO: 39.25 MB #Memory Used# [2025-03-02 20:15:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:15:04 [end_date_ymd] => 2025-03-02 20:15:04 [RateCDR] => 1 ) [2025-03-02 20: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-03-02 17:15:04' and `end` < '2025-03-02 20: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-03-02 20:15:16] Production.INFO: count ==1406 [2025-03-02 20:15:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:15:04 - End Time 2025-03-02 20:15:04 [2025-03-02 20:15:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593501', 'tblTempUsageDetail_20' ) start [2025-03-02 20:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593501', 'tblTempUsageDetail_20' ) end [2025-03-02 20:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593501', 'tblTempVendorCDR_20' ) start [2025-03-02 20:15:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593501', 'tblTempVendorCDR_20' ) end [2025-03-02 20:15:17] Production.INFO: ProcessCDR(1,14593501,1,1,2) [2025-03-02 20:15:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593501,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:15:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593501,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:15:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593501,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:15:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593501,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:15:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593501', 'tblTempUsageDetail_20' ) start [2025-03-02 20:15:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593501', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:15:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:15:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:15:25] Production.INFO: ==30481== Releasing lock... [2025-03-02 20:15:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:15:25] Production.INFO: 39.25 MB #Memory Used# [2025-03-02 20:16:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:16:04 [end_date_ymd] => 2025-03-02 20:16:04 [RateCDR] => 1 ) [2025-03-02 20: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-03-02 17:16:04' and `end` < '2025-03-02 20: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-03-02 20:16:16] Production.INFO: count ==1405 [2025-03-02 20:16:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:16:04 - End Time 2025-03-02 20:16:04 [2025-03-02 20:16:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593506', 'tblTempUsageDetail_20' ) start [2025-03-02 20:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593506', 'tblTempUsageDetail_20' ) end [2025-03-02 20:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593506', 'tblTempVendorCDR_20' ) start [2025-03-02 20:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593506', 'tblTempVendorCDR_20' ) end [2025-03-02 20:16:16] Production.INFO: ProcessCDR(1,14593506,1,1,2) [2025-03-02 20:16:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593506,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:16:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593506,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:16:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593506,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:16:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593506,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593506', 'tblTempUsageDetail_20' ) start [2025-03-02 20:16:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593506', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:16:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:16:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:16:24] Production.INFO: ==30582== Releasing lock... [2025-03-02 20:16:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:16:24] Production.INFO: 39.5 MB #Memory Used# [2025-03-02 20:17:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:17:05 [end_date_ymd] => 2025-03-02 20:17:05 [RateCDR] => 1 ) [2025-03-02 20: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-03-02 17:17:05' and `end` < '2025-03-02 20: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-03-02 20:17:17] Production.INFO: count ==1400 [2025-03-02 20:17:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:17:05 - End Time 2025-03-02 20:17:05 [2025-03-02 20:17:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593511', 'tblTempUsageDetail_20' ) start [2025-03-02 20:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593511', 'tblTempUsageDetail_20' ) end [2025-03-02 20:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593511', 'tblTempVendorCDR_20' ) start [2025-03-02 20:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593511', 'tblTempVendorCDR_20' ) end [2025-03-02 20:17:17] Production.INFO: ProcessCDR(1,14593511,1,1,2) [2025-03-02 20:17:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593511,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:17:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593511,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:17:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593511,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:17:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593511,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:17:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593511', 'tblTempUsageDetail_20' ) start [2025-03-02 20:17:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593511', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:17:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:17:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:17:25] Production.INFO: ==30667== Releasing lock... [2025-03-02 20:17:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:17:25] Production.INFO: 39.25 MB #Memory Used# [2025-03-02 20:18:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:18:04 [end_date_ymd] => 2025-03-02 20:18:04 [RateCDR] => 1 ) [2025-03-02 20:18: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-03-02 17:18:04' and `end` < '2025-03-02 20:18: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-03-02 20:18:17] Production.INFO: count ==1394 [2025-03-02 20:18:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:18:04 - End Time 2025-03-02 20:18:04 [2025-03-02 20:18:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593516', 'tblTempUsageDetail_20' ) start [2025-03-02 20:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593516', 'tblTempUsageDetail_20' ) end [2025-03-02 20:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593516', 'tblTempVendorCDR_20' ) start [2025-03-02 20:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593516', 'tblTempVendorCDR_20' ) end [2025-03-02 20:18:17] Production.INFO: ProcessCDR(1,14593516,1,1,2) [2025-03-02 20:18:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593516,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:18:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593516,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:18:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593516,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:18:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593516,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593516', 'tblTempUsageDetail_20' ) start [2025-03-02 20:18:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593516', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:18:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:18:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:18:24] Production.INFO: ==30768== Releasing lock... [2025-03-02 20:18:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:18:24] Production.INFO: 39.25 MB #Memory Used# [2025-03-02 20:19:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:19:04 [end_date_ymd] => 2025-03-02 20:19:04 [RateCDR] => 1 ) [2025-03-02 20: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-03-02 17:19:04' and `end` < '2025-03-02 20: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-03-02 20:19:16] Production.INFO: count ==1394 [2025-03-02 20:19:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:19:04 - End Time 2025-03-02 20:19:04 [2025-03-02 20:19:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593521', 'tblTempUsageDetail_20' ) start [2025-03-02 20:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593521', 'tblTempUsageDetail_20' ) end [2025-03-02 20:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593521', 'tblTempVendorCDR_20' ) start [2025-03-02 20:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593521', 'tblTempVendorCDR_20' ) end [2025-03-02 20:19:16] Production.INFO: ProcessCDR(1,14593521,1,1,2) [2025-03-02 20:19:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593521,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:19:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593521,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:19:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593521,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:19:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593521,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:19:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593521', 'tblTempUsageDetail_20' ) start [2025-03-02 20:19:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593521', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:19:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:19:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:19:24] Production.INFO: ==30886== Releasing lock... [2025-03-02 20:19:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:19:24] Production.INFO: 39.25 MB #Memory Used# [2025-03-02 20:20:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:20:04 [end_date_ymd] => 2025-03-02 20:20:04 [RateCDR] => 1 ) [2025-03-02 20:20: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-03-02 17:20:04' and `end` < '2025-03-02 20:20: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-03-02 20:20:16] Production.INFO: count ==1388 [2025-03-02 20:20:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:20:04 - End Time 2025-03-02 20:20:04 [2025-03-02 20:20:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:20:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593527', 'tblTempUsageDetail_20' ) start [2025-03-02 20:20:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593527', 'tblTempUsageDetail_20' ) end [2025-03-02 20:20:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593527', 'tblTempVendorCDR_20' ) start [2025-03-02 20:20:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593527', 'tblTempVendorCDR_20' ) end [2025-03-02 20:20:16] Production.INFO: ProcessCDR(1,14593527,1,1,2) [2025-03-02 20:20:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593527,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:20:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593527,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:20:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593527,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:20:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593527,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:20:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593527', 'tblTempUsageDetail_20' ) start [2025-03-02 20:20:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593527', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:20:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:20:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:20:24] Production.INFO: ==30971== Releasing lock... [2025-03-02 20:20:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:20:24] Production.INFO: 39 MB #Memory Used# [2025-03-02 20:21:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:21:04 [end_date_ymd] => 2025-03-02 20:21:04 [RateCDR] => 1 ) [2025-03-02 20:21: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-03-02 17:21:04' and `end` < '2025-03-02 20:21: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-03-02 20:21:17] Production.INFO: count ==1391 [2025-03-02 20:21:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:21:04 - End Time 2025-03-02 20:21:04 [2025-03-02 20:21:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593532', 'tblTempUsageDetail_20' ) start [2025-03-02 20:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593532', 'tblTempUsageDetail_20' ) end [2025-03-02 20:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593532', 'tblTempVendorCDR_20' ) start [2025-03-02 20:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593532', 'tblTempVendorCDR_20' ) end [2025-03-02 20:21:17] Production.INFO: ProcessCDR(1,14593532,1,1,2) [2025-03-02 20:21:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593532,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:21:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593532,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:21:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593532,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:21:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593532,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:21:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593532', 'tblTempUsageDetail_20' ) start [2025-03-02 20:21:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593532', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:21:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:21:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:21:24] Production.INFO: ==31073== Releasing lock... [2025-03-02 20:21:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:21:24] Production.INFO: 39 MB #Memory Used# [2025-03-02 20:22:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:22:04 [end_date_ymd] => 2025-03-02 20:22:04 [RateCDR] => 1 ) [2025-03-02 20: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-03-02 17:22:04' and `end` < '2025-03-02 20: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-03-02 20:22:16] Production.INFO: count ==1392 [2025-03-02 20:22:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:22:04 - End Time 2025-03-02 20:22:04 [2025-03-02 20:22:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:22:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593537', 'tblTempUsageDetail_20' ) start [2025-03-02 20:22:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593537', 'tblTempUsageDetail_20' ) end [2025-03-02 20:22:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593537', 'tblTempVendorCDR_20' ) start [2025-03-02 20:22:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593537', 'tblTempVendorCDR_20' ) end [2025-03-02 20:22:16] Production.INFO: ProcessCDR(1,14593537,1,1,2) [2025-03-02 20:22:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593537,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:22:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593537,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:22:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593537,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:22:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593537,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593537', 'tblTempUsageDetail_20' ) start [2025-03-02 20:22:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593537', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:22:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:22:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:22:23] Production.INFO: ==31163== Releasing lock... [2025-03-02 20:22:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:22:23] Production.INFO: 39 MB #Memory Used# [2025-03-02 20:23:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:23:05 [end_date_ymd] => 2025-03-02 20:23:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:23:05' and `end` < '2025-03-02 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-03-02 20:23:17] Production.INFO: count ==1390 [2025-03-02 20:23:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:23:05 - End Time 2025-03-02 20:23:05 [2025-03-02 20:23:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593542', 'tblTempUsageDetail_20' ) start [2025-03-02 20:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593542', 'tblTempUsageDetail_20' ) end [2025-03-02 20:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593542', 'tblTempVendorCDR_20' ) start [2025-03-02 20:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593542', 'tblTempVendorCDR_20' ) end [2025-03-02 20:23:17] Production.INFO: ProcessCDR(1,14593542,1,1,2) [2025-03-02 20:23:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593542,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:23:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593542,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:23:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593542,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:23:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593542,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:23:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593542', 'tblTempUsageDetail_20' ) start [2025-03-02 20:23:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593542', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:23:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:23:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:23:25] Production.INFO: ==31266== Releasing lock... [2025-03-02 20:23:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:23:25] Production.INFO: 39 MB #Memory Used# [2025-03-02 20:24:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:24:04 [end_date_ymd] => 2025-03-02 20:24:04 [RateCDR] => 1 ) [2025-03-02 20:24: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-03-02 17:24:04' and `end` < '2025-03-02 20:24: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-03-02 20:24:16] Production.INFO: count ==1388 [2025-03-02 20:24:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:24:04 - End Time 2025-03-02 20:24:04 [2025-03-02 20:24:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:24:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593547', 'tblTempUsageDetail_20' ) start [2025-03-02 20:24:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593547', 'tblTempUsageDetail_20' ) end [2025-03-02 20:24:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593547', 'tblTempVendorCDR_20' ) start [2025-03-02 20:24:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593547', 'tblTempVendorCDR_20' ) end [2025-03-02 20:24:16] Production.INFO: ProcessCDR(1,14593547,1,1,2) [2025-03-02 20:24:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593547,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:24:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593547,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:24:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593547,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:24:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593547,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593547', 'tblTempUsageDetail_20' ) start [2025-03-02 20:24:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593547', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:24:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:24:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:24:23] Production.INFO: ==31352== Releasing lock... [2025-03-02 20:24:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:24:23] Production.INFO: 39 MB #Memory Used# [2025-03-02 20:25:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:25:04 [end_date_ymd] => 2025-03-02 20:25:04 [RateCDR] => 1 ) [2025-03-02 20: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-03-02 17:25:04' and `end` < '2025-03-02 20: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-03-02 20:25:16] Production.INFO: count ==1387 [2025-03-02 20:25:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:25:04 - End Time 2025-03-02 20:25:04 [2025-03-02 20:25:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593552', 'tblTempUsageDetail_20' ) start [2025-03-02 20:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593552', 'tblTempUsageDetail_20' ) end [2025-03-02 20:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593552', 'tblTempVendorCDR_20' ) start [2025-03-02 20:25:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593552', 'tblTempVendorCDR_20' ) end [2025-03-02 20:25:17] Production.INFO: ProcessCDR(1,14593552,1,1,2) [2025-03-02 20:25:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593552,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:25:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593552,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:25:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593552,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:25:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593552,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:25:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593552', 'tblTempUsageDetail_20' ) start [2025-03-02 20:25:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593552', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:25:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:25:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:25:24] Production.INFO: ==31445== Releasing lock... [2025-03-02 20:25:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:25:24] Production.INFO: 39 MB #Memory Used# [2025-03-02 20:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:26:05 [end_date_ymd] => 2025-03-02 20:26:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:26:05' and `end` < '2025-03-02 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-03-02 20:26:17] Production.INFO: count ==1388 [2025-03-02 20:26:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:26:05 - End Time 2025-03-02 20:26:05 [2025-03-02 20:26:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593557', 'tblTempUsageDetail_20' ) start [2025-03-02 20:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593557', 'tblTempUsageDetail_20' ) end [2025-03-02 20:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593557', 'tblTempVendorCDR_20' ) start [2025-03-02 20:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593557', 'tblTempVendorCDR_20' ) end [2025-03-02 20:26:17] Production.INFO: ProcessCDR(1,14593557,1,1,2) [2025-03-02 20:26:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593557,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:26:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593557,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:26:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593557,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:26:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593557,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:26:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593557', 'tblTempUsageDetail_20' ) start [2025-03-02 20:26:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593557', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:26:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:26:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:26:25] Production.INFO: ==31541== Releasing lock... [2025-03-02 20:26:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:26:25] Production.INFO: 39 MB #Memory Used# [2025-03-02 20:27:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:27:04 [end_date_ymd] => 2025-03-02 20:27:04 [RateCDR] => 1 ) [2025-03-02 20:27: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-03-02 17:27:04' and `end` < '2025-03-02 20:27: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-03-02 20:27:16] Production.INFO: count ==1387 [2025-03-02 20:27:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:27:04 - End Time 2025-03-02 20:27:04 [2025-03-02 20:27:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593562', 'tblTempUsageDetail_20' ) start [2025-03-02 20:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593562', 'tblTempUsageDetail_20' ) end [2025-03-02 20:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593562', 'tblTempVendorCDR_20' ) start [2025-03-02 20:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593562', 'tblTempVendorCDR_20' ) end [2025-03-02 20:27:16] Production.INFO: ProcessCDR(1,14593562,1,1,2) [2025-03-02 20:27:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593562,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:27:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593562,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:27:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593562,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:27:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593562,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:27:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593562', 'tblTempUsageDetail_20' ) start [2025-03-02 20:27:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593562', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:27:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:27:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:27:24] Production.INFO: ==31635== Releasing lock... [2025-03-02 20:27:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:27:24] Production.INFO: 39 MB #Memory Used# [2025-03-02 20:28:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:28:04 [end_date_ymd] => 2025-03-02 20:28:04 [RateCDR] => 1 ) [2025-03-02 20:28: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-03-02 17:28:04' and `end` < '2025-03-02 20:28: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-03-02 20:28:16] Production.INFO: count ==1385 [2025-03-02 20:28:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:28:04 - End Time 2025-03-02 20:28:04 [2025-03-02 20:28:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593567', 'tblTempUsageDetail_20' ) start [2025-03-02 20:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593567', 'tblTempUsageDetail_20' ) end [2025-03-02 20:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593567', 'tblTempVendorCDR_20' ) start [2025-03-02 20:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593567', 'tblTempVendorCDR_20' ) end [2025-03-02 20:28:17] Production.INFO: ProcessCDR(1,14593567,1,1,2) [2025-03-02 20:28:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593567,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:28:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593567,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:28:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593567,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:28:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593567,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:28:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593567', 'tblTempUsageDetail_20' ) start [2025-03-02 20:28:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593567', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:28:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:28:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:28:24] Production.INFO: ==31723== Releasing lock... [2025-03-02 20:28:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:28:24] Production.INFO: 39 MB #Memory Used# [2025-03-02 20:29:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:29:04 [end_date_ymd] => 2025-03-02 20:29:04 [RateCDR] => 1 ) [2025-03-02 20: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-03-02 17:29:04' and `end` < '2025-03-02 20: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-03-02 20:29:16] Production.INFO: count ==1385 [2025-03-02 20:29:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:29:04 - End Time 2025-03-02 20:29:04 [2025-03-02 20:29:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593572', 'tblTempUsageDetail_20' ) start [2025-03-02 20:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593572', 'tblTempUsageDetail_20' ) end [2025-03-02 20:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593572', 'tblTempVendorCDR_20' ) start [2025-03-02 20:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593572', 'tblTempVendorCDR_20' ) end [2025-03-02 20:29:16] Production.INFO: ProcessCDR(1,14593572,1,1,2) [2025-03-02 20:29:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593572,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:29:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593572,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:29:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593572,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:29:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593572,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:29:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593572', 'tblTempUsageDetail_20' ) start [2025-03-02 20:29:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593572', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:29:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:29:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:29:24] Production.INFO: ==31857== Releasing lock... [2025-03-02 20:29:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:29:24] Production.INFO: 39 MB #Memory Used# [2025-03-02 20:30:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:30:05 [end_date_ymd] => 2025-03-02 20:30:05 [RateCDR] => 1 ) [2025-03-02 20: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-03-02 17:30:05' and `end` < '2025-03-02 20: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-03-02 20:30:17] Production.INFO: count ==1380 [2025-03-02 20:30:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:30:05 - End Time 2025-03-02 20:30:05 [2025-03-02 20:30:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593578', 'tblTempUsageDetail_20' ) start [2025-03-02 20:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593578', 'tblTempUsageDetail_20' ) end [2025-03-02 20:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593578', 'tblTempVendorCDR_20' ) start [2025-03-02 20:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593578', 'tblTempVendorCDR_20' ) end [2025-03-02 20:30:17] Production.INFO: ProcessCDR(1,14593578,1,1,2) [2025-03-02 20:30:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593578,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:30:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593578,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:30:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593578,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:30:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593578,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:30:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593578', 'tblTempUsageDetail_20' ) start [2025-03-02 20:30:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593578', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:30:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:30:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:30:25] Production.INFO: ==31956== Releasing lock... [2025-03-02 20:30:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:30:25] Production.INFO: 39 MB #Memory Used# [2025-03-02 20:31:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:31:04 [end_date_ymd] => 2025-03-02 20:31:04 [RateCDR] => 1 ) [2025-03-02 20:31: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-03-02 17:31:04' and `end` < '2025-03-02 20:31: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-03-02 20:31:16] Production.INFO: count ==1340 [2025-03-02 20:31:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:31:04 - End Time 2025-03-02 20:31:04 [2025-03-02 20:31:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593583', 'tblTempUsageDetail_20' ) start [2025-03-02 20:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593583', 'tblTempUsageDetail_20' ) end [2025-03-02 20:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593583', 'tblTempVendorCDR_20' ) start [2025-03-02 20:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593583', 'tblTempVendorCDR_20' ) end [2025-03-02 20:31:16] Production.INFO: ProcessCDR(1,14593583,1,1,2) [2025-03-02 20:31:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593583,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:31:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593583,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:31:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593583,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:31:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593583,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:31:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593583', 'tblTempUsageDetail_20' ) start [2025-03-02 20:31:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593583', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:31:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:31:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:31:24] Production.INFO: ==32054== Releasing lock... [2025-03-02 20:31:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:31:24] Production.INFO: 39 MB #Memory Used# [2025-03-02 20:32:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:32:04 [end_date_ymd] => 2025-03-02 20:32:04 [RateCDR] => 1 ) [2025-03-02 20: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-03-02 17:32:04' and `end` < '2025-03-02 20: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-03-02 20:32:16] Production.INFO: count ==1337 [2025-03-02 20:32:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:32:04 - End Time 2025-03-02 20:32:04 [2025-03-02 20:32:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593588', 'tblTempUsageDetail_20' ) start [2025-03-02 20:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593588', 'tblTempUsageDetail_20' ) end [2025-03-02 20:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593588', 'tblTempVendorCDR_20' ) start [2025-03-02 20:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593588', 'tblTempVendorCDR_20' ) end [2025-03-02 20:32:17] Production.INFO: ProcessCDR(1,14593588,1,1,2) [2025-03-02 20:32:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593588,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:32:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593588,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:32:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593588,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:32:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593588,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:32:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593588', 'tblTempUsageDetail_20' ) start [2025-03-02 20:32:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593588', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:32:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:32:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:32:24] Production.INFO: ==32156== Releasing lock... [2025-03-02 20:32:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:32:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 20:33:03] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:33:03 [end_date_ymd] => 2025-03-02 20:33:03 [RateCDR] => 1 ) [2025-03-02 20:33:03] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:33:03' and `end` < '2025-03-02 20:33:03' AND ( userfield like '%outbound%' or userfield like '%inbound%' or ( userfield = '' AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' ) /*-- Ignore Internal call*/ ) AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/ AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE' and prevuniqueid='' group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'') [2025-03-02 20:33:15] Production.INFO: count ==1340 [2025-03-02 20:33:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:33:03 - End Time 2025-03-02 20:33:03 [2025-03-02 20:33:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593593', 'tblTempUsageDetail_20' ) start [2025-03-02 20:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593593', 'tblTempUsageDetail_20' ) end [2025-03-02 20:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593593', 'tblTempVendorCDR_20' ) start [2025-03-02 20:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593593', 'tblTempVendorCDR_20' ) end [2025-03-02 20:33:16] Production.INFO: ProcessCDR(1,14593593,1,1,2) [2025-03-02 20:33:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593593,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:33:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593593,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:33:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593593,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:33:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593593,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:33:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593593', 'tblTempUsageDetail_20' ) start [2025-03-02 20:33:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593593', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:33:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:33:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:33:23] Production.INFO: ==32251== Releasing lock... [2025-03-02 20:33:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:33:23] Production.INFO: 39 MB #Memory Used# [2025-03-02 20:34:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:34:04 [end_date_ymd] => 2025-03-02 20:34:04 [RateCDR] => 1 ) [2025-03-02 20:34: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-03-02 17:34:04' and `end` < '2025-03-02 20:34: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-03-02 20:34:17] Production.INFO: count ==1343 [2025-03-02 20:34:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:34:04 - End Time 2025-03-02 20:34:04 [2025-03-02 20:34:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593598', 'tblTempUsageDetail_20' ) start [2025-03-02 20:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593598', 'tblTempUsageDetail_20' ) end [2025-03-02 20:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593598', 'tblTempVendorCDR_20' ) start [2025-03-02 20:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593598', 'tblTempVendorCDR_20' ) end [2025-03-02 20:34:17] Production.INFO: ProcessCDR(1,14593598,1,1,2) [2025-03-02 20:34:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593598,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:34:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593598,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:34:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593598,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:34:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593598,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:34:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593598', 'tblTempUsageDetail_20' ) start [2025-03-02 20:34:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593598', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:34:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:34:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:34:24] Production.INFO: ==32340== Releasing lock... [2025-03-02 20:34:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:34:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 20:35:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:35:05 [end_date_ymd] => 2025-03-02 20:35:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:35:05' and `end` < '2025-03-02 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-03-02 20:35:17] Production.INFO: count ==1339 [2025-03-02 20:35:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:35:05 - End Time 2025-03-02 20:35:05 [2025-03-02 20:35:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593603', 'tblTempUsageDetail_20' ) start [2025-03-02 20:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593603', 'tblTempUsageDetail_20' ) end [2025-03-02 20:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593603', 'tblTempVendorCDR_20' ) start [2025-03-02 20:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593603', 'tblTempVendorCDR_20' ) end [2025-03-02 20:35:17] Production.INFO: ProcessCDR(1,14593603,1,1,2) [2025-03-02 20:35:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593603,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:35:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593603,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:35:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593603,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:35:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593603,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:35:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593603', 'tblTempUsageDetail_20' ) start [2025-03-02 20:35:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593603', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:35:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:35:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:35:25] Production.INFO: ==32431== Releasing lock... [2025-03-02 20:35:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:35:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 20:36:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:36:04 [end_date_ymd] => 2025-03-02 20:36:04 [RateCDR] => 1 ) [2025-03-02 20:36: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-03-02 17:36:04' and `end` < '2025-03-02 20:36: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-03-02 20:36:16] Production.INFO: count ==1338 [2025-03-02 20:36:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:36:04 - End Time 2025-03-02 20:36:04 [2025-03-02 20:36:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593608', 'tblTempUsageDetail_20' ) start [2025-03-02 20:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593608', 'tblTempUsageDetail_20' ) end [2025-03-02 20:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593608', 'tblTempVendorCDR_20' ) start [2025-03-02 20:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593608', 'tblTempVendorCDR_20' ) end [2025-03-02 20:36:16] Production.INFO: ProcessCDR(1,14593608,1,1,2) [2025-03-02 20:36:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593608,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:36:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593608,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:36:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593608,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:36:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593608,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:36:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593608', 'tblTempUsageDetail_20' ) start [2025-03-02 20:36:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593608', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:36:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:36:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:36:24] Production.INFO: ==32513== Releasing lock... [2025-03-02 20:36:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:36:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 20:37:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:37:05 [end_date_ymd] => 2025-03-02 20:37:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:37:05' and `end` < '2025-03-02 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-03-02 20:37:17] Production.INFO: count ==1340 [2025-03-02 20:37:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:37:05 - End Time 2025-03-02 20:37:05 [2025-03-02 20:37:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593613', 'tblTempUsageDetail_20' ) start [2025-03-02 20:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593613', 'tblTempUsageDetail_20' ) end [2025-03-02 20:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593613', 'tblTempVendorCDR_20' ) start [2025-03-02 20:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593613', 'tblTempVendorCDR_20' ) end [2025-03-02 20:37:17] Production.INFO: ProcessCDR(1,14593613,1,1,2) [2025-03-02 20:37:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593613,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:37:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593613,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:37:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593613,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:37:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593613,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:37:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593613', 'tblTempUsageDetail_20' ) start [2025-03-02 20:37:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593613', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:37:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:37:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:37:24] Production.INFO: ==32604== Releasing lock... [2025-03-02 20:37:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:37:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 20:38:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:38:05 [end_date_ymd] => 2025-03-02 20:38:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:38:05' and `end` < '2025-03-02 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-03-02 20:38:17] Production.INFO: count ==1336 [2025-03-02 20:38:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:38:05 - End Time 2025-03-02 20:38:05 [2025-03-02 20:38:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593618', 'tblTempUsageDetail_20' ) start [2025-03-02 20:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593618', 'tblTempUsageDetail_20' ) end [2025-03-02 20:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593618', 'tblTempVendorCDR_20' ) start [2025-03-02 20:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593618', 'tblTempVendorCDR_20' ) end [2025-03-02 20:38:17] Production.INFO: ProcessCDR(1,14593618,1,1,2) [2025-03-02 20:38:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593618,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:38:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593618,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:38:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593618,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:38:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593618,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:38:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593618', 'tblTempUsageDetail_20' ) start [2025-03-02 20:38:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593618', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:38:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:38:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:38:24] Production.INFO: ==32691== Releasing lock... [2025-03-02 20:38:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:38:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 20:39:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:39:05 [end_date_ymd] => 2025-03-02 20:39:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:39:05' and `end` < '2025-03-02 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-03-02 20:39:17] Production.INFO: count ==1334 [2025-03-02 20:39:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:39:05 - End Time 2025-03-02 20:39:05 [2025-03-02 20:39:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593623', 'tblTempUsageDetail_20' ) start [2025-03-02 20:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593623', 'tblTempUsageDetail_20' ) end [2025-03-02 20:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593623', 'tblTempVendorCDR_20' ) start [2025-03-02 20:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593623', 'tblTempVendorCDR_20' ) end [2025-03-02 20:39:17] Production.INFO: ProcessCDR(1,14593623,1,1,2) [2025-03-02 20:39:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593623,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:39:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593623,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:39:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593623,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:39:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593623,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:39:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593623', 'tblTempUsageDetail_20' ) start [2025-03-02 20:39:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593623', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:39:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:39:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:39:25] Production.INFO: ==304== Releasing lock... [2025-03-02 20:39:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:39:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 20:40:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:40:04 [end_date_ymd] => 2025-03-02 20:40:04 [RateCDR] => 1 ) [2025-03-02 20:40: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-03-02 17:40:04' and `end` < '2025-03-02 20:40: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-03-02 20:40:17] Production.INFO: count ==1332 [2025-03-02 20:40:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:40:04 - End Time 2025-03-02 20:40:04 [2025-03-02 20:40:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593629', 'tblTempUsageDetail_20' ) start [2025-03-02 20:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593629', 'tblTempUsageDetail_20' ) end [2025-03-02 20:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593629', 'tblTempVendorCDR_20' ) start [2025-03-02 20:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593629', 'tblTempVendorCDR_20' ) end [2025-03-02 20:40:17] Production.INFO: ProcessCDR(1,14593629,1,1,2) [2025-03-02 20:40:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593629,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:40:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593629,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:40:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593629,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:40:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593629,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:40:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593629', 'tblTempUsageDetail_20' ) start [2025-03-02 20:40:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593629', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:40:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:40:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:40:25] Production.INFO: ==425== Releasing lock... [2025-03-02 20:40:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:40:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 20:41:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:41:04 [end_date_ymd] => 2025-03-02 20:41:04 [RateCDR] => 1 ) [2025-03-02 20: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-03-02 17:41:04' and `end` < '2025-03-02 20: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-03-02 20:41:16] Production.INFO: count ==1338 [2025-03-02 20:41:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:41:04 - End Time 2025-03-02 20:41:04 [2025-03-02 20:41:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593634', 'tblTempUsageDetail_20' ) start [2025-03-02 20:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593634', 'tblTempUsageDetail_20' ) end [2025-03-02 20:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593634', 'tblTempVendorCDR_20' ) start [2025-03-02 20:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593634', 'tblTempVendorCDR_20' ) end [2025-03-02 20:41:17] Production.INFO: ProcessCDR(1,14593634,1,1,2) [2025-03-02 20:41:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593634,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:41:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593634,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:41:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593634,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:41:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593634,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:41:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593634', 'tblTempUsageDetail_20' ) start [2025-03-02 20:41:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593634', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:41:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:41:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:41:24] Production.INFO: ==561== Releasing lock... [2025-03-02 20:41:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:41:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 20:42:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:42:04 [end_date_ymd] => 2025-03-02 20:42:04 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:42:04' and `end` < '2025-03-02 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-03-02 20:42:16] Production.INFO: count ==1338 [2025-03-02 20:42:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:42:04 - End Time 2025-03-02 20:42:04 [2025-03-02 20:42:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593639', 'tblTempUsageDetail_20' ) start [2025-03-02 20:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593639', 'tblTempUsageDetail_20' ) end [2025-03-02 20:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593639', 'tblTempVendorCDR_20' ) start [2025-03-02 20:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593639', 'tblTempVendorCDR_20' ) end [2025-03-02 20:42:17] Production.INFO: ProcessCDR(1,14593639,1,1,2) [2025-03-02 20:42:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593639,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:42:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593639,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:42:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593639,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:42:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593639,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:42:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593639', 'tblTempUsageDetail_20' ) start [2025-03-02 20:42:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593639', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:42:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:42:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:42:24] Production.INFO: ==709== Releasing lock... [2025-03-02 20:42:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:42:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 20:43:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:43:05 [end_date_ymd] => 2025-03-02 20:43:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:43:05' and `end` < '2025-03-02 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-03-02 20:43:17] Production.INFO: count ==1338 [2025-03-02 20:43:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:43:05 - End Time 2025-03-02 20:43:05 [2025-03-02 20:43:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593644', 'tblTempUsageDetail_20' ) start [2025-03-02 20:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593644', 'tblTempUsageDetail_20' ) end [2025-03-02 20:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593644', 'tblTempVendorCDR_20' ) start [2025-03-02 20:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593644', 'tblTempVendorCDR_20' ) end [2025-03-02 20:43:17] Production.INFO: ProcessCDR(1,14593644,1,1,2) [2025-03-02 20:43:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593644,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:43:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593644,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:43:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593644,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:43:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593644,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:43:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593644', 'tblTempUsageDetail_20' ) start [2025-03-02 20:43:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593644', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:43:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:43:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:43:25] Production.INFO: ==807== Releasing lock... [2025-03-02 20:43:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:43:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 20:44:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:44:04 [end_date_ymd] => 2025-03-02 20:44:04 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:44:04' and `end` < '2025-03-02 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-03-02 20:44:16] Production.INFO: count ==1341 [2025-03-02 20:44:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:44:04 - End Time 2025-03-02 20:44:04 [2025-03-02 20:44:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593649', 'tblTempUsageDetail_20' ) start [2025-03-02 20:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593649', 'tblTempUsageDetail_20' ) end [2025-03-02 20:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593649', 'tblTempVendorCDR_20' ) start [2025-03-02 20:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593649', 'tblTempVendorCDR_20' ) end [2025-03-02 20:44:16] Production.INFO: ProcessCDR(1,14593649,1,1,2) [2025-03-02 20:44:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593649,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:44:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593649,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:44:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593649,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:44:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593649,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593649', 'tblTempUsageDetail_20' ) start [2025-03-02 20:44:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593649', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:44:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:44:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:44:24] Production.INFO: ==929== Releasing lock... [2025-03-02 20:44:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:44:24] Production.INFO: 39 MB #Memory Used# [2025-03-02 20:45:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:45:05 [end_date_ymd] => 2025-03-02 20:45:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:45:05' and `end` < '2025-03-02 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-03-02 20:45:17] Production.INFO: count ==1340 [2025-03-02 20:45:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:45:05 - End Time 2025-03-02 20:45:05 [2025-03-02 20:45:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593654', 'tblTempUsageDetail_20' ) start [2025-03-02 20:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593654', 'tblTempUsageDetail_20' ) end [2025-03-02 20:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593654', 'tblTempVendorCDR_20' ) start [2025-03-02 20:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593654', 'tblTempVendorCDR_20' ) end [2025-03-02 20:45:17] Production.INFO: ProcessCDR(1,14593654,1,1,2) [2025-03-02 20:45:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593654,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:45:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593654,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:45:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593654,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:45:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593654,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:45:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593654', 'tblTempUsageDetail_20' ) start [2025-03-02 20:45:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593654', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:45:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:45:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:45:25] Production.INFO: ==1022== Releasing lock... [2025-03-02 20:45:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:45:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 20:46:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:46:04 [end_date_ymd] => 2025-03-02 20:46:04 [RateCDR] => 1 ) [2025-03-02 20: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-03-02 17:46:04' and `end` < '2025-03-02 20: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-03-02 20:46:16] Production.INFO: count ==1344 [2025-03-02 20:46:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:46:04 - End Time 2025-03-02 20:46:04 [2025-03-02 20:46:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593659', 'tblTempUsageDetail_20' ) start [2025-03-02 20:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593659', 'tblTempUsageDetail_20' ) end [2025-03-02 20:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593659', 'tblTempVendorCDR_20' ) start [2025-03-02 20:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593659', 'tblTempVendorCDR_20' ) end [2025-03-02 20:46:17] Production.INFO: ProcessCDR(1,14593659,1,1,2) [2025-03-02 20:46:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593659,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:46:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593659,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:46:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593659,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:46:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593659,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:46:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593659', 'tblTempUsageDetail_20' ) start [2025-03-02 20:46:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593659', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:46:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:46:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:46:24] Production.INFO: ==1113== Releasing lock... [2025-03-02 20:46:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:46:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 20:47:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:47:04 [end_date_ymd] => 2025-03-02 20:47:04 [RateCDR] => 1 ) [2025-03-02 20: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-03-02 17:47:04' and `end` < '2025-03-02 20: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-03-02 20:47:16] Production.INFO: count ==1341 [2025-03-02 20:47:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:47:04 - End Time 2025-03-02 20:47:04 [2025-03-02 20:47:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593664', 'tblTempUsageDetail_20' ) start [2025-03-02 20:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593664', 'tblTempUsageDetail_20' ) end [2025-03-02 20:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593664', 'tblTempVendorCDR_20' ) start [2025-03-02 20:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593664', 'tblTempVendorCDR_20' ) end [2025-03-02 20:47:17] Production.INFO: ProcessCDR(1,14593664,1,1,2) [2025-03-02 20:47:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593664,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:47:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593664,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:47:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593664,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:47:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593664,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:47:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593664', 'tblTempUsageDetail_20' ) start [2025-03-02 20:47:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593664', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:47:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:47:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:47:24] Production.INFO: ==1224== Releasing lock... [2025-03-02 20:47:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:47:24] Production.INFO: 39 MB #Memory Used# [2025-03-02 20:48:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:48:04 [end_date_ymd] => 2025-03-02 20:48:04 [RateCDR] => 1 ) [2025-03-02 20: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-03-02 17:48:04' and `end` < '2025-03-02 20: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-03-02 20:48:16] Production.INFO: count ==1339 [2025-03-02 20:48:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:48:04 - End Time 2025-03-02 20:48:04 [2025-03-02 20:48:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593669', 'tblTempUsageDetail_20' ) start [2025-03-02 20:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593669', 'tblTempUsageDetail_20' ) end [2025-03-02 20:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593669', 'tblTempVendorCDR_20' ) start [2025-03-02 20:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593669', 'tblTempVendorCDR_20' ) end [2025-03-02 20:48:16] Production.INFO: ProcessCDR(1,14593669,1,1,2) [2025-03-02 20:48:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593669,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:48:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593669,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:48:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593669,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:48:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593669,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:48:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593669', 'tblTempUsageDetail_20' ) start [2025-03-02 20:48:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593669', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:48:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:48:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:48:24] Production.INFO: ==1335== Releasing lock... [2025-03-02 20:48:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:48:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 20:49:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:04 [end_date_ymd] => 2025-03-02 20:49:04 [RateCDR] => 1 ) [2025-03-02 20:49: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-03-02 17:49:04' and `end` < '2025-03-02 20:49: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-03-02 20:49:16] Production.INFO: count ==1334 [2025-03-02 20:49:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:04 - End Time 2025-03-02 20:49:04 [2025-03-02 20:49:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593674', 'tblTempUsageDetail_20' ) start [2025-03-02 20:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593674', 'tblTempUsageDetail_20' ) end [2025-03-02 20:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593674', 'tblTempVendorCDR_20' ) start [2025-03-02 20:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593674', 'tblTempVendorCDR_20' ) end [2025-03-02 20:49:17] Production.INFO: ProcessCDR(1,14593674,1,1,2) [2025-03-02 20:49:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593674,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:49:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593674,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:49:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593674,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:49:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593674,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:49:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593674', 'tblTempUsageDetail_20' ) start [2025-03-02 20:49:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593674', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:49:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:49:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:49:24] Production.INFO: ==1438== Releasing lock... [2025-03-02 20:49:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:49:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 20:50:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 20: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 20:50:17] Production.INFO: count ==1334 [2025-03-02 20:50:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 20:50:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593679', 'tblTempUsageDetail_20' ) start [2025-03-02 20:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593679', 'tblTempUsageDetail_20' ) end [2025-03-02 20:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593679', 'tblTempVendorCDR_20' ) start [2025-03-02 20:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593679', 'tblTempVendorCDR_20' ) end [2025-03-02 20:50:17] Production.INFO: ProcessCDR(1,14593679,1,1,2) [2025-03-02 20:50:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593679,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:50:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593679,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:50:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593679,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:50:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593679,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:50:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593679', 'tblTempUsageDetail_20' ) start [2025-03-02 20:50:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593679', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:50:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:50:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:50:24] Production.INFO: ==1566== Releasing lock... [2025-03-02 20:50:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:50:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 20:51:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 20: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 20:51:16] Production.INFO: count ==1334 [2025-03-02 20:51:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 20:51:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593685', 'tblTempUsageDetail_20' ) start [2025-03-02 20:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593685', 'tblTempUsageDetail_20' ) end [2025-03-02 20:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593685', 'tblTempVendorCDR_20' ) start [2025-03-02 20:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593685', 'tblTempVendorCDR_20' ) end [2025-03-02 20:51:16] Production.INFO: ProcessCDR(1,14593685,1,1,2) [2025-03-02 20:51:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593685,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:51:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593685,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:51:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593685,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:51:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593685,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:51:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593685', 'tblTempUsageDetail_20' ) start [2025-03-02 20:51:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593685', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:51:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:51:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:51:24] Production.INFO: ==1666== Releasing lock... [2025-03-02 20:51:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:51:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 20:52:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 20:52: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 20:52:17] Production.INFO: count ==1334 [2025-03-02 20:52:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 20:52:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593690', 'tblTempUsageDetail_20' ) start [2025-03-02 20:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593690', 'tblTempUsageDetail_20' ) end [2025-03-02 20:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593690', 'tblTempVendorCDR_20' ) start [2025-03-02 20:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593690', 'tblTempVendorCDR_20' ) end [2025-03-02 20:52:17] Production.INFO: ProcessCDR(1,14593690,1,1,2) [2025-03-02 20:52:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593690,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:52:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593690,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:52:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593690,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:52:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593690,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:52:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593690', 'tblTempUsageDetail_20' ) start [2025-03-02 20:52:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593690', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:52:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:52:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:52:24] Production.INFO: ==1753== Releasing lock... [2025-03-02 20:52:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:52:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 20:53:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 20: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 20:53:16] Production.INFO: count ==1334 [2025-03-02 20:53:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 20:53:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593695', 'tblTempUsageDetail_20' ) start [2025-03-02 20:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593695', 'tblTempUsageDetail_20' ) end [2025-03-02 20:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593695', 'tblTempVendorCDR_20' ) start [2025-03-02 20:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593695', 'tblTempVendorCDR_20' ) end [2025-03-02 20:53:16] Production.INFO: ProcessCDR(1,14593695,1,1,2) [2025-03-02 20:53:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593695,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:53:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593695,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:53:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593695,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:53:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593695,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593695', 'tblTempUsageDetail_20' ) start [2025-03-02 20:53:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593695', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:53:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:53:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:53:24] Production.INFO: ==1871== Releasing lock... [2025-03-02 20:53:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:53:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 20:54:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 20:54: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 20:54:16] Production.INFO: count ==1334 [2025-03-02 20:54:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 20:54:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593700', 'tblTempUsageDetail_20' ) start [2025-03-02 20:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593700', 'tblTempUsageDetail_20' ) end [2025-03-02 20:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593700', 'tblTempVendorCDR_20' ) start [2025-03-02 20:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593700', 'tblTempVendorCDR_20' ) end [2025-03-02 20:54:17] Production.INFO: ProcessCDR(1,14593700,1,1,2) [2025-03-02 20:54:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593700,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:54:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593700,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:54:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593700,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:54:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593700,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:54:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593700', 'tblTempUsageDetail_20' ) start [2025-03-02 20:54:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593700', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:54:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:54:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:54:24] Production.INFO: ==1956== Releasing lock... [2025-03-02 20:54:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:54:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 20:55:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 20:55: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 20:55:16] Production.INFO: count ==1334 [2025-03-02 20:55:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 20:55:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593705', 'tblTempUsageDetail_20' ) start [2025-03-02 20:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593705', 'tblTempUsageDetail_20' ) end [2025-03-02 20:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593705', 'tblTempVendorCDR_20' ) start [2025-03-02 20:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593705', 'tblTempVendorCDR_20' ) end [2025-03-02 20:55:16] Production.INFO: ProcessCDR(1,14593705,1,1,2) [2025-03-02 20:55:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593705,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:55:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593705,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:55:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593705,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:55:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593705,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593705', 'tblTempUsageDetail_20' ) start [2025-03-02 20:55:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593705', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:55:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:55:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:55:24] Production.INFO: ==2045== Releasing lock... [2025-03-02 20:55:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:55:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 20:56:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 20:56: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 20:56:16] Production.INFO: count ==1334 [2025-03-02 20:56:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 20:56:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593710', 'tblTempUsageDetail_20' ) start [2025-03-02 20:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593710', 'tblTempUsageDetail_20' ) end [2025-03-02 20:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593710', 'tblTempVendorCDR_20' ) start [2025-03-02 20:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593710', 'tblTempVendorCDR_20' ) end [2025-03-02 20:56:16] Production.INFO: ProcessCDR(1,14593710,1,1,2) [2025-03-02 20:56:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593710,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:56:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593710,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:56:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593710,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:56:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593710,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:56:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593710', 'tblTempUsageDetail_20' ) start [2025-03-02 20:56:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593710', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:56:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:56:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:56:24] Production.INFO: ==2142== Releasing lock... [2025-03-02 20:56:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:56:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 20:57:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 20:57: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 20:57:16] Production.INFO: count ==1334 [2025-03-02 20:57:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 20:57:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593715', 'tblTempUsageDetail_20' ) start [2025-03-02 20:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593715', 'tblTempUsageDetail_20' ) end [2025-03-02 20:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593715', 'tblTempVendorCDR_20' ) start [2025-03-02 20:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593715', 'tblTempVendorCDR_20' ) end [2025-03-02 20:57:16] Production.INFO: ProcessCDR(1,14593715,1,1,2) [2025-03-02 20:57:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593715,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:57:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593715,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:57:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593715,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:57:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593715,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:57:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593715', 'tblTempUsageDetail_20' ) start [2025-03-02 20:57:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593715', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:57:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:57:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:57:24] Production.INFO: ==2243== Releasing lock... [2025-03-02 20:57:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:57:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 20:58:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 20: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 20:58:16] Production.INFO: count ==1334 [2025-03-02 20:58:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 20:58:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593720', 'tblTempUsageDetail_20' ) start [2025-03-02 20:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593720', 'tblTempUsageDetail_20' ) end [2025-03-02 20:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593720', 'tblTempVendorCDR_20' ) start [2025-03-02 20:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593720', 'tblTempVendorCDR_20' ) end [2025-03-02 20:58:16] Production.INFO: ProcessCDR(1,14593720,1,1,2) [2025-03-02 20:58:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593720,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:58:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593720,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:58:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593720,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:58:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593720,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:58:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593720', 'tblTempUsageDetail_20' ) start [2025-03-02 20:58:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593720', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:58:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:58:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:58:24] Production.INFO: ==2347== Releasing lock... [2025-03-02 20:58:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:58:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 20:59:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 20: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 20:59:16] Production.INFO: count ==1334 [2025-03-02 20:59:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 20:59:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 20:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593725', 'tblTempUsageDetail_20' ) start [2025-03-02 20:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593725', 'tblTempUsageDetail_20' ) end [2025-03-02 20:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593725', 'tblTempVendorCDR_20' ) start [2025-03-02 20:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593725', 'tblTempVendorCDR_20' ) end [2025-03-02 20:59:16] Production.INFO: ProcessCDR(1,14593725,1,1,2) [2025-03-02 20:59:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593725,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:59:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593725,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 20:59:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593725,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:59:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593725,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 20:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593725', 'tblTempUsageDetail_20' ) start [2025-03-02 20:59:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593725', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 20:59:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 20:59:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 20:59:24] Production.INFO: ==2457== Releasing lock... [2025-03-02 20:59:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 20:59:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:00:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:00:17] Production.INFO: count ==1334 [2025-03-02 21:00:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:00:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593731', 'tblTempUsageDetail_20' ) start [2025-03-02 21:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593731', 'tblTempUsageDetail_20' ) end [2025-03-02 21:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593731', 'tblTempVendorCDR_20' ) start [2025-03-02 21:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593731', 'tblTempVendorCDR_20' ) end [2025-03-02 21:00:17] Production.INFO: ProcessCDR(1,14593731,1,1,2) [2025-03-02 21:00:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593731,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:00:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593731,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:00:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593731,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:00:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593731,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:00:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593731', 'tblTempUsageDetail_20' ) start [2025-03-02 21:00:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593731', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:00:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:00:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:00:25] Production.INFO: ==2592== Releasing lock... [2025-03-02 21:00:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:00:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:01:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21:01: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:01:16] Production.INFO: count ==1334 [2025-03-02 21:01:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:01:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593736', 'tblTempUsageDetail_20' ) start [2025-03-02 21:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593736', 'tblTempUsageDetail_20' ) end [2025-03-02 21:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593736', 'tblTempVendorCDR_20' ) start [2025-03-02 21:01:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593736', 'tblTempVendorCDR_20' ) end [2025-03-02 21:01:16] Production.INFO: ProcessCDR(1,14593736,1,1,2) [2025-03-02 21:01:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593736,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:01:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593736,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:01:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593736,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:01:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593736,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:01:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593736', 'tblTempUsageDetail_20' ) start [2025-03-02 21:01:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593736', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:01:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:01:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:01:24] Production.INFO: ==2698== Releasing lock... [2025-03-02 21:01:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:01:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:02:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21:02: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:02:17] Production.INFO: count ==1334 [2025-03-02 21:02:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:02:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593741', 'tblTempUsageDetail_20' ) start [2025-03-02 21:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593741', 'tblTempUsageDetail_20' ) end [2025-03-02 21:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593741', 'tblTempVendorCDR_20' ) start [2025-03-02 21:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593741', 'tblTempVendorCDR_20' ) end [2025-03-02 21:02:17] Production.INFO: ProcessCDR(1,14593741,1,1,2) [2025-03-02 21:02:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593741,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:02:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593741,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:02:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593741,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:02:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593741,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:02:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593741', 'tblTempUsageDetail_20' ) start [2025-03-02 21:02:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593741', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:02:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:02:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:02:25] Production.INFO: ==2800== Releasing lock... [2025-03-02 21:02:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:02:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:03:03] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21:03:03] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:03:15] Production.INFO: count ==1334 [2025-03-02 21:03:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:03:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:03:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593746', 'tblTempUsageDetail_20' ) start [2025-03-02 21:03:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593746', 'tblTempUsageDetail_20' ) end [2025-03-02 21:03:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593746', 'tblTempVendorCDR_20' ) start [2025-03-02 21:03:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593746', 'tblTempVendorCDR_20' ) end [2025-03-02 21:03:16] Production.INFO: ProcessCDR(1,14593746,1,1,2) [2025-03-02 21:03:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593746,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:03:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593746,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:03:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593746,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:03:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593746,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:03:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593746', 'tblTempUsageDetail_20' ) start [2025-03-02 21:03:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593746', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:03:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:03:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:03:23] Production.INFO: ==2899== Releasing lock... [2025-03-02 21:03:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:03:23] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:04:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:04:17] Production.INFO: count ==1334 [2025-03-02 21:04:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:04:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593751', 'tblTempUsageDetail_20' ) start [2025-03-02 21:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593751', 'tblTempUsageDetail_20' ) end [2025-03-02 21:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593751', 'tblTempVendorCDR_20' ) start [2025-03-02 21:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593751', 'tblTempVendorCDR_20' ) end [2025-03-02 21:04:17] Production.INFO: ProcessCDR(1,14593751,1,1,2) [2025-03-02 21:04:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593751,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:04:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593751,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:04:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593751,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:04:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593751,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:04:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593751', 'tblTempUsageDetail_20' ) start [2025-03-02 21:04:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593751', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:04:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:04:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:04:25] Production.INFO: ==2986== Releasing lock... [2025-03-02 21:04:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:04:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:05:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21:05: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:05:16] Production.INFO: count ==1334 [2025-03-02 21:05:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:05:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593756', 'tblTempUsageDetail_20' ) start [2025-03-02 21:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593756', 'tblTempUsageDetail_20' ) end [2025-03-02 21:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593756', 'tblTempVendorCDR_20' ) start [2025-03-02 21:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593756', 'tblTempVendorCDR_20' ) end [2025-03-02 21:05:16] Production.INFO: ProcessCDR(1,14593756,1,1,2) [2025-03-02 21:05:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593756,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:05:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593756,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:05:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593756,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:05:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593756,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:05:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593756', 'tblTempUsageDetail_20' ) start [2025-03-02 21:05:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593756', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:05:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:05:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:05:24] Production.INFO: ==3080== Releasing lock... [2025-03-02 21:05:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:05:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:06:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:06:17] Production.INFO: count ==1334 [2025-03-02 21:06:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:06:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593761', 'tblTempUsageDetail_20' ) start [2025-03-02 21:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593761', 'tblTempUsageDetail_20' ) end [2025-03-02 21:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593761', 'tblTempVendorCDR_20' ) start [2025-03-02 21:06:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593761', 'tblTempVendorCDR_20' ) end [2025-03-02 21:06:17] Production.INFO: ProcessCDR(1,14593761,1,1,2) [2025-03-02 21:06:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593761,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:06:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593761,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:06:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593761,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:06:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593761,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:06:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593761', 'tblTempUsageDetail_20' ) start [2025-03-02 21:06:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593761', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:06:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:06:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:06:25] Production.INFO: ==3174== Releasing lock... [2025-03-02 21:06:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:06:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:07:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:07:16] Production.INFO: count ==1334 [2025-03-02 21:07:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:07:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:07:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593766', 'tblTempUsageDetail_20' ) start [2025-03-02 21:07:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593766', 'tblTempUsageDetail_20' ) end [2025-03-02 21:07:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593766', 'tblTempVendorCDR_20' ) start [2025-03-02 21:07:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593766', 'tblTempVendorCDR_20' ) end [2025-03-02 21:07:16] Production.INFO: ProcessCDR(1,14593766,1,1,2) [2025-03-02 21:07:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593766,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:07:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593766,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:07:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593766,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:07:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593766,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:07:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593766', 'tblTempUsageDetail_20' ) start [2025-03-02 21:07:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593766', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:07:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:07:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:07:24] Production.INFO: ==3277== Releasing lock... [2025-03-02 21:07:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:07:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:08:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21:08: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:08:16] Production.INFO: count ==1334 [2025-03-02 21:08:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:08:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593771', 'tblTempUsageDetail_20' ) start [2025-03-02 21:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593771', 'tblTempUsageDetail_20' ) end [2025-03-02 21:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593771', 'tblTempVendorCDR_20' ) start [2025-03-02 21:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593771', 'tblTempVendorCDR_20' ) end [2025-03-02 21:08:17] Production.INFO: ProcessCDR(1,14593771,1,1,2) [2025-03-02 21:08:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593771,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:08:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593771,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:08:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593771,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:08:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593771,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:08:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593771', 'tblTempUsageDetail_20' ) start [2025-03-02 21:08:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593771', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:08:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:08:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:08:24] Production.INFO: ==3365== Releasing lock... [2025-03-02 21:08:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:08:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:09:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:09:17] Production.INFO: count ==1334 [2025-03-02 21:09:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:09:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593776', 'tblTempUsageDetail_20' ) start [2025-03-02 21:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593776', 'tblTempUsageDetail_20' ) end [2025-03-02 21:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593776', 'tblTempVendorCDR_20' ) start [2025-03-02 21:09:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593776', 'tblTempVendorCDR_20' ) end [2025-03-02 21:09:17] Production.INFO: ProcessCDR(1,14593776,1,1,2) [2025-03-02 21:09:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593776,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:09:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593776,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:09:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593776,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:09:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593776,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:09:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593776', 'tblTempUsageDetail_20' ) start [2025-03-02 21:09:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593776', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:09:26] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:09:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:09:26] Production.INFO: ==3461== Releasing lock... [2025-03-02 21:09:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:09:26] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:10:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:10:17] Production.INFO: count ==1334 [2025-03-02 21:10:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:10:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593782', 'tblTempUsageDetail_20' ) start [2025-03-02 21:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593782', 'tblTempUsageDetail_20' ) end [2025-03-02 21:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593782', 'tblTempVendorCDR_20' ) start [2025-03-02 21:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593782', 'tblTempVendorCDR_20' ) end [2025-03-02 21:10:17] Production.INFO: ProcessCDR(1,14593782,1,1,2) [2025-03-02 21:10:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593782,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:10:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593782,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:10:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593782,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:10:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593782,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:10:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593782', 'tblTempUsageDetail_20' ) start [2025-03-02 21:10:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593782', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:10:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:10:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:10:25] Production.INFO: ==3560== Releasing lock... [2025-03-02 21:10:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:10:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:11:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:11:16] Production.INFO: count ==1334 [2025-03-02 21:11:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:11:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:11:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593787', 'tblTempUsageDetail_20' ) start [2025-03-02 21:11:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593787', 'tblTempUsageDetail_20' ) end [2025-03-02 21:11:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593787', 'tblTempVendorCDR_20' ) start [2025-03-02 21:11:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593787', 'tblTempVendorCDR_20' ) end [2025-03-02 21:11:16] Production.INFO: ProcessCDR(1,14593787,1,1,2) [2025-03-02 21:11:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593787,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:11:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593787,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:11:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593787,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:11:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593787,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:11:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593787', 'tblTempUsageDetail_20' ) start [2025-03-02 21:11:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593787', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:11:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:11:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:11:24] Production.INFO: ==3651== Releasing lock... [2025-03-02 21:11:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:11:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:12:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21:12: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:12:16] Production.INFO: count ==1334 [2025-03-02 21:12:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:12:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593792', 'tblTempUsageDetail_20' ) start [2025-03-02 21:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593792', 'tblTempUsageDetail_20' ) end [2025-03-02 21:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593792', 'tblTempVendorCDR_20' ) start [2025-03-02 21:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593792', 'tblTempVendorCDR_20' ) end [2025-03-02 21:12:16] Production.INFO: ProcessCDR(1,14593792,1,1,2) [2025-03-02 21:12:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593792,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:12:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593792,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:12:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593792,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:12:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593792,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:12:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593792', 'tblTempUsageDetail_20' ) start [2025-03-02 21:12:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593792', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:12:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:12:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:12:24] Production.INFO: ==3746== Releasing lock... [2025-03-02 21:12:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:12:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:13:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:13:17] Production.INFO: count ==1334 [2025-03-02 21:13:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:13:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593797', 'tblTempUsageDetail_20' ) start [2025-03-02 21:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593797', 'tblTempUsageDetail_20' ) end [2025-03-02 21:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593797', 'tblTempVendorCDR_20' ) start [2025-03-02 21:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593797', 'tblTempVendorCDR_20' ) end [2025-03-02 21:13:17] Production.INFO: ProcessCDR(1,14593797,1,1,2) [2025-03-02 21:13:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593797,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:13:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593797,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:13:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593797,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:13:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593797,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:13:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593797', 'tblTempUsageDetail_20' ) start [2025-03-02 21:13:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593797', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:13:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:13:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:13:24] Production.INFO: ==3833== Releasing lock... [2025-03-02 21:13:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:13:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:14:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:14:16] Production.INFO: count ==1334 [2025-03-02 21:14:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:14:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:14:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593802', 'tblTempUsageDetail_20' ) start [2025-03-02 21:14:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593802', 'tblTempUsageDetail_20' ) end [2025-03-02 21:14:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593802', 'tblTempVendorCDR_20' ) start [2025-03-02 21:14:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593802', 'tblTempVendorCDR_20' ) end [2025-03-02 21:14:16] Production.INFO: ProcessCDR(1,14593802,1,1,2) [2025-03-02 21:14:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593802,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:14:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593802,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:14:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593802,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:14:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593802,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:14:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593802', 'tblTempUsageDetail_20' ) start [2025-03-02 21:14:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593802', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:14:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:14:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:14:24] Production.INFO: ==3920== Releasing lock... [2025-03-02 21:14:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:14:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:15:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:15:16] Production.INFO: count ==1335 [2025-03-02 21:15:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:15:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593807', 'tblTempUsageDetail_20' ) start [2025-03-02 21:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593807', 'tblTempUsageDetail_20' ) end [2025-03-02 21:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593807', 'tblTempVendorCDR_20' ) start [2025-03-02 21:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593807', 'tblTempVendorCDR_20' ) end [2025-03-02 21:15:16] Production.INFO: ProcessCDR(1,14593807,1,1,2) [2025-03-02 21:15:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593807,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:15:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593807,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:15:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593807,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:15:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593807,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:15:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593807', 'tblTempUsageDetail_20' ) start [2025-03-02 21:15:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593807', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:15:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:15:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:15:24] Production.INFO: ==4054== Releasing lock... [2025-03-02 21:15:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:15:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:16:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:16:16] Production.INFO: count ==1335 [2025-03-02 21:16:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:16:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593812', 'tblTempUsageDetail_20' ) start [2025-03-02 21:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593812', 'tblTempUsageDetail_20' ) end [2025-03-02 21:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593812', 'tblTempVendorCDR_20' ) start [2025-03-02 21:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593812', 'tblTempVendorCDR_20' ) end [2025-03-02 21:16:16] Production.INFO: ProcessCDR(1,14593812,1,1,2) [2025-03-02 21:16:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593812,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:16:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593812,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:16:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593812,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:16:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593812,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593812', 'tblTempUsageDetail_20' ) start [2025-03-02 21:16:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593812', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:16:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:16:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:16:24] Production.INFO: ==4155== Releasing lock... [2025-03-02 21:16:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:16:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:17:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:17:16] Production.INFO: count ==1335 [2025-03-02 21:17:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:17:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593817', 'tblTempUsageDetail_20' ) start [2025-03-02 21:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593817', 'tblTempUsageDetail_20' ) end [2025-03-02 21:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593817', 'tblTempVendorCDR_20' ) start [2025-03-02 21:17:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593817', 'tblTempVendorCDR_20' ) end [2025-03-02 21:17:16] Production.INFO: ProcessCDR(1,14593817,1,1,2) [2025-03-02 21:17:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593817,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:17:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593817,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:17:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593817,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:17:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593817,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:17:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593817', 'tblTempUsageDetail_20' ) start [2025-03-02 21:17:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593817', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:17:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:17:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:17:24] Production.INFO: ==4253== Releasing lock... [2025-03-02 21:17:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:17:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:18:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21:18: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:18:16] Production.INFO: count ==1335 [2025-03-02 21:18:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:18:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593822', 'tblTempUsageDetail_20' ) start [2025-03-02 21:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593822', 'tblTempUsageDetail_20' ) end [2025-03-02 21:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593822', 'tblTempVendorCDR_20' ) start [2025-03-02 21:18:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593822', 'tblTempVendorCDR_20' ) end [2025-03-02 21:18:16] Production.INFO: ProcessCDR(1,14593822,1,1,2) [2025-03-02 21:18:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593822,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:18:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593822,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:18:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593822,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:18:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593822,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:18:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593822', 'tblTempUsageDetail_20' ) start [2025-03-02 21:18:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593822', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:18:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:18:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:18:24] Production.INFO: ==4333== Releasing lock... [2025-03-02 21:18:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:18:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:19:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:19:16] Production.INFO: count ==1335 [2025-03-02 21:19:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:19:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593827', 'tblTempUsageDetail_20' ) start [2025-03-02 21:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593827', 'tblTempUsageDetail_20' ) end [2025-03-02 21:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593827', 'tblTempVendorCDR_20' ) start [2025-03-02 21:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593827', 'tblTempVendorCDR_20' ) end [2025-03-02 21:19:16] Production.INFO: ProcessCDR(1,14593827,1,1,2) [2025-03-02 21:19:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593827,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:19:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593827,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:19:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593827,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:19:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593827,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:19:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593827', 'tblTempUsageDetail_20' ) start [2025-03-02 21:19:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593827', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:19:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:19:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:19:23] Production.INFO: ==4427== Releasing lock... [2025-03-02 21:19:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:19:23] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:20:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21:20: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:20:16] Production.INFO: count ==1335 [2025-03-02 21:20:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:20:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:20:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593833', 'tblTempUsageDetail_20' ) start [2025-03-02 21:20:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593833', 'tblTempUsageDetail_20' ) end [2025-03-02 21:20:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593833', 'tblTempVendorCDR_20' ) start [2025-03-02 21:20:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593833', 'tblTempVendorCDR_20' ) end [2025-03-02 21:20:16] Production.INFO: ProcessCDR(1,14593833,1,1,2) [2025-03-02 21:20:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593833,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:20:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593833,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:20:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593833,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:20:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593833,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:20:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593833', 'tblTempUsageDetail_20' ) start [2025-03-02 21:20:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593833', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:20:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:20:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:20:24] Production.INFO: ==4525== Releasing lock... [2025-03-02 21:20:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:20:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:21:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21:21: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:21:16] Production.INFO: count ==1335 [2025-03-02 21:21:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:21:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593838', 'tblTempUsageDetail_20' ) start [2025-03-02 21:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593838', 'tblTempUsageDetail_20' ) end [2025-03-02 21:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593838', 'tblTempVendorCDR_20' ) start [2025-03-02 21:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593838', 'tblTempVendorCDR_20' ) end [2025-03-02 21:21:16] Production.INFO: ProcessCDR(1,14593838,1,1,2) [2025-03-02 21:21:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593838,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:21:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593838,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:21:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593838,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:21:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593838,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:21:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593838', 'tblTempUsageDetail_20' ) start [2025-03-02 21:21:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593838', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:21:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:21:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:21:24] Production.INFO: ==4628== Releasing lock... [2025-03-02 21:21:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:21:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:22:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:22:16] Production.INFO: count ==1335 [2025-03-02 21:22:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:22:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:22:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593843', 'tblTempUsageDetail_20' ) start [2025-03-02 21:22:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593843', 'tblTempUsageDetail_20' ) end [2025-03-02 21:22:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593843', 'tblTempVendorCDR_20' ) start [2025-03-02 21:22:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593843', 'tblTempVendorCDR_20' ) end [2025-03-02 21:22:16] Production.INFO: ProcessCDR(1,14593843,1,1,2) [2025-03-02 21:22:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593843,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:22:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593843,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:22:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593843,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:22:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593843,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:22:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593843', 'tblTempUsageDetail_20' ) start [2025-03-02 21:22:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593843', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:22:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:22:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:22:24] Production.INFO: ==4728== Releasing lock... [2025-03-02 21:22:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:22:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:23:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21:23: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:23:16] Production.INFO: count ==1335 [2025-03-02 21:23:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:23:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593848', 'tblTempUsageDetail_20' ) start [2025-03-02 21:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593848', 'tblTempUsageDetail_20' ) end [2025-03-02 21:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593848', 'tblTempVendorCDR_20' ) start [2025-03-02 21:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593848', 'tblTempVendorCDR_20' ) end [2025-03-02 21:23:16] Production.INFO: ProcessCDR(1,14593848,1,1,2) [2025-03-02 21:23:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593848,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:23:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593848,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:23:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593848,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:23:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593848,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:23:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593848', 'tblTempUsageDetail_20' ) start [2025-03-02 21:23:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593848', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:23:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:23:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:23:24] Production.INFO: ==4827== Releasing lock... [2025-03-02 21:23:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:23:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:24:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:24:17] Production.INFO: count ==1335 [2025-03-02 21:24:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:24:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593853', 'tblTempUsageDetail_20' ) start [2025-03-02 21:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593853', 'tblTempUsageDetail_20' ) end [2025-03-02 21:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593853', 'tblTempVendorCDR_20' ) start [2025-03-02 21:24:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593853', 'tblTempVendorCDR_20' ) end [2025-03-02 21:24:17] Production.INFO: ProcessCDR(1,14593853,1,1,2) [2025-03-02 21:24:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593853,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:24:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593853,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:24:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593853,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:24:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593853,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:24:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593853', 'tblTempUsageDetail_20' ) start [2025-03-02 21:24:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593853', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:24:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:24:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:24:25] Production.INFO: ==4925== Releasing lock... [2025-03-02 21:24:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:24:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:25:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:25:16] Production.INFO: count ==1335 [2025-03-02 21:25:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:25:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593858', 'tblTempUsageDetail_20' ) start [2025-03-02 21:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593858', 'tblTempUsageDetail_20' ) end [2025-03-02 21:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593858', 'tblTempVendorCDR_20' ) start [2025-03-02 21:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593858', 'tblTempVendorCDR_20' ) end [2025-03-02 21:25:16] Production.INFO: ProcessCDR(1,14593858,1,1,2) [2025-03-02 21:25:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593858,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:25:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593858,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:25:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593858,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:25:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593858,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593858', 'tblTempUsageDetail_20' ) start [2025-03-02 21:25:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593858', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:25:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:25:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:25:24] Production.INFO: ==5003== Releasing lock... [2025-03-02 21:25:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:25:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:26:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:26:16] Production.INFO: count ==1335 [2025-03-02 21:26:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:26:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:26:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593863', 'tblTempUsageDetail_20' ) start [2025-03-02 21:26:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593863', 'tblTempUsageDetail_20' ) end [2025-03-02 21:26:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593863', 'tblTempVendorCDR_20' ) start [2025-03-02 21:26:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593863', 'tblTempVendorCDR_20' ) end [2025-03-02 21:26:16] Production.INFO: ProcessCDR(1,14593863,1,1,2) [2025-03-02 21:26:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593863,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:26:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593863,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:26:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593863,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:26:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593863,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:26:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593863', 'tblTempUsageDetail_20' ) start [2025-03-02 21:26:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593863', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:26:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:26:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:26:24] Production.INFO: ==5095== Releasing lock... [2025-03-02 21:26:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:26:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:27:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21:27: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:27:16] Production.INFO: count ==1335 [2025-03-02 21:27:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:27:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593868', 'tblTempUsageDetail_20' ) start [2025-03-02 21:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593868', 'tblTempUsageDetail_20' ) end [2025-03-02 21:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593868', 'tblTempVendorCDR_20' ) start [2025-03-02 21:27:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593868', 'tblTempVendorCDR_20' ) end [2025-03-02 21:27:16] Production.INFO: ProcessCDR(1,14593868,1,1,2) [2025-03-02 21:27:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593868,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:27:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593868,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:27:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593868,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:27:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593868,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:27:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593868', 'tblTempUsageDetail_20' ) start [2025-03-02 21:27:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593868', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:27:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:27:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:27:23] Production.INFO: ==5181== Releasing lock... [2025-03-02 21:27:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:27:23] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:28:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21:28: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:28:16] Production.INFO: count ==1335 [2025-03-02 21:28:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:28:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593873', 'tblTempUsageDetail_20' ) start [2025-03-02 21:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593873', 'tblTempUsageDetail_20' ) end [2025-03-02 21:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593873', 'tblTempVendorCDR_20' ) start [2025-03-02 21:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593873', 'tblTempVendorCDR_20' ) end [2025-03-02 21:28:17] Production.INFO: ProcessCDR(1,14593873,1,1,2) [2025-03-02 21:28:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593873,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:28:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593873,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:28:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593873,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:28:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593873,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:28:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593873', 'tblTempUsageDetail_20' ) start [2025-03-02 21:28:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593873', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:28:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:28:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:28:24] Production.INFO: ==5264== Releasing lock... [2025-03-02 21:28:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:28:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:29:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:29:17] Production.INFO: count ==1335 [2025-03-02 21:29:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:29:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593878', 'tblTempUsageDetail_20' ) start [2025-03-02 21:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593878', 'tblTempUsageDetail_20' ) end [2025-03-02 21:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593878', 'tblTempVendorCDR_20' ) start [2025-03-02 21:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593878', 'tblTempVendorCDR_20' ) end [2025-03-02 21:29:17] Production.INFO: ProcessCDR(1,14593878,1,1,2) [2025-03-02 21:29:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593878,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:29:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593878,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:29:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593878,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:29:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593878,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:29:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593878', 'tblTempUsageDetail_20' ) start [2025-03-02 21:29:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593878', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:29:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:29:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:29:25] Production.INFO: ==5344== Releasing lock... [2025-03-02 21:29:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:29:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:30:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:30:17] Production.INFO: count ==1335 [2025-03-02 21:30:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:30:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593884', 'tblTempUsageDetail_20' ) start [2025-03-02 21:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593884', 'tblTempUsageDetail_20' ) end [2025-03-02 21:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593884', 'tblTempVendorCDR_20' ) start [2025-03-02 21:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593884', 'tblTempVendorCDR_20' ) end [2025-03-02 21:30:17] Production.INFO: ProcessCDR(1,14593884,1,1,2) [2025-03-02 21:30:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593884,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:30:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593884,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:30:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593884,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:30:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593884,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:30:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593884', 'tblTempUsageDetail_20' ) start [2025-03-02 21:30:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593884', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:30:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:30:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:30:25] Production.INFO: ==5434== Releasing lock... [2025-03-02 21:30:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:30:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:31:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:31:17] Production.INFO: count ==1335 [2025-03-02 21:31:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:31:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593889', 'tblTempUsageDetail_20' ) start [2025-03-02 21:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593889', 'tblTempUsageDetail_20' ) end [2025-03-02 21:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593889', 'tblTempVendorCDR_20' ) start [2025-03-02 21:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593889', 'tblTempVendorCDR_20' ) end [2025-03-02 21:31:17] Production.INFO: ProcessCDR(1,14593889,1,1,2) [2025-03-02 21:31:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593889,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:31:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593889,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:31:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593889,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:31:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593889,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:31:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593889', 'tblTempUsageDetail_20' ) start [2025-03-02 21:31:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593889', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:31:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:31:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:31:25] Production.INFO: ==5553== Releasing lock... [2025-03-02 21:31:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:31:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:32:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:32:16] Production.INFO: count ==1335 [2025-03-02 21:32:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:32:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593894', 'tblTempUsageDetail_20' ) start [2025-03-02 21:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593894', 'tblTempUsageDetail_20' ) end [2025-03-02 21:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593894', 'tblTempVendorCDR_20' ) start [2025-03-02 21:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593894', 'tblTempVendorCDR_20' ) end [2025-03-02 21:32:16] Production.INFO: ProcessCDR(1,14593894,1,1,2) [2025-03-02 21:32:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593894,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:32:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593894,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:32:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593894,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:32:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593894,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:32:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593894', 'tblTempUsageDetail_20' ) start [2025-03-02 21:32:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593894', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:32:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:32:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:32:24] Production.INFO: ==5627== Releasing lock... [2025-03-02 21:32:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:32:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:33:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21:33: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:33:16] Production.INFO: count ==1335 [2025-03-02 21:33:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:33:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593899', 'tblTempUsageDetail_20' ) start [2025-03-02 21:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593899', 'tblTempUsageDetail_20' ) end [2025-03-02 21:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593899', 'tblTempVendorCDR_20' ) start [2025-03-02 21:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593899', 'tblTempVendorCDR_20' ) end [2025-03-02 21:33:16] Production.INFO: ProcessCDR(1,14593899,1,1,2) [2025-03-02 21:33:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593899,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:33:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593899,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:33:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593899,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:33:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593899,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:33:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593899', 'tblTempUsageDetail_20' ) start [2025-03-02 21:33:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593899', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:33:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:33:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:33:24] Production.INFO: ==5698== Releasing lock... [2025-03-02 21:33:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:33:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:34:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21:34: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:34:16] Production.INFO: count ==1335 [2025-03-02 21:34:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:34:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593904', 'tblTempUsageDetail_20' ) start [2025-03-02 21:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593904', 'tblTempUsageDetail_20' ) end [2025-03-02 21:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593904', 'tblTempVendorCDR_20' ) start [2025-03-02 21:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593904', 'tblTempVendorCDR_20' ) end [2025-03-02 21:34:16] Production.INFO: ProcessCDR(1,14593904,1,1,2) [2025-03-02 21:34:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593904,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:34:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593904,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:34:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593904,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:34:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593904,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:34:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593904', 'tblTempUsageDetail_20' ) start [2025-03-02 21:34:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593904', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:34:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:34:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:34:24] Production.INFO: ==5780== Releasing lock... [2025-03-02 21:34:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:34:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:35:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:35:16] Production.INFO: count ==1335 [2025-03-02 21:35:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:35:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593909', 'tblTempUsageDetail_20' ) start [2025-03-02 21:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593909', 'tblTempUsageDetail_20' ) end [2025-03-02 21:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593909', 'tblTempVendorCDR_20' ) start [2025-03-02 21:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593909', 'tblTempVendorCDR_20' ) end [2025-03-02 21:35:17] Production.INFO: ProcessCDR(1,14593909,1,1,2) [2025-03-02 21:35:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593909,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:35:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593909,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:35:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593909,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:35:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593909,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:35:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593909', 'tblTempUsageDetail_20' ) start [2025-03-02 21:35:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593909', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:35:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:35:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:35:24] Production.INFO: ==5863== Releasing lock... [2025-03-02 21:35:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:35:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:36:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21:36: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:36:16] Production.INFO: count ==1335 [2025-03-02 21:36:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:36:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593914', 'tblTempUsageDetail_20' ) start [2025-03-02 21:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593914', 'tblTempUsageDetail_20' ) end [2025-03-02 21:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593914', 'tblTempVendorCDR_20' ) start [2025-03-02 21:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593914', 'tblTempVendorCDR_20' ) end [2025-03-02 21:36:16] Production.INFO: ProcessCDR(1,14593914,1,1,2) [2025-03-02 21:36:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593914,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:36:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593914,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:36:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593914,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:36:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593914,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:36:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593914', 'tblTempUsageDetail_20' ) start [2025-03-02 21:36:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593914', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:36:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:36:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:36:24] Production.INFO: ==5945== Releasing lock... [2025-03-02 21:36:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:36:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:37:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:37:16] Production.INFO: count ==1335 [2025-03-02 21:37:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:37:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593919', 'tblTempUsageDetail_20' ) start [2025-03-02 21:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593919', 'tblTempUsageDetail_20' ) end [2025-03-02 21:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593919', 'tblTempVendorCDR_20' ) start [2025-03-02 21:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593919', 'tblTempVendorCDR_20' ) end [2025-03-02 21:37:17] Production.INFO: ProcessCDR(1,14593919,1,1,2) [2025-03-02 21:37:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593919,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:37:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593919,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:37:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593919,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:37:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593919,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593919', 'tblTempUsageDetail_20' ) start [2025-03-02 21:37:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593919', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:37:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:37:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:37:24] Production.INFO: ==6032== Releasing lock... [2025-03-02 21:37:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:37:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:38:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21:38: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:38:16] Production.INFO: count ==1335 [2025-03-02 21:38:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:38:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593924', 'tblTempUsageDetail_20' ) start [2025-03-02 21:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593924', 'tblTempUsageDetail_20' ) end [2025-03-02 21:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593924', 'tblTempVendorCDR_20' ) start [2025-03-02 21:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593924', 'tblTempVendorCDR_20' ) end [2025-03-02 21:38:16] Production.INFO: ProcessCDR(1,14593924,1,1,2) [2025-03-02 21:38:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593924,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:38:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593924,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:38:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593924,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:38:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593924,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593924', 'tblTempUsageDetail_20' ) start [2025-03-02 21:38:22] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593924', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:38:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:38:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:38:23] Production.INFO: ==6107== Releasing lock... [2025-03-02 21:38:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:38:23] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:39:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:39:16] Production.INFO: count ==1335 [2025-03-02 21:39:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:39:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593929', 'tblTempUsageDetail_20' ) start [2025-03-02 21:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593929', 'tblTempUsageDetail_20' ) end [2025-03-02 21:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593929', 'tblTempVendorCDR_20' ) start [2025-03-02 21:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593929', 'tblTempVendorCDR_20' ) end [2025-03-02 21:39:16] Production.INFO: ProcessCDR(1,14593929,1,1,2) [2025-03-02 21:39:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593929,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:39:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593929,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:39:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593929,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:39:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593929,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:39:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593929', 'tblTempUsageDetail_20' ) start [2025-03-02 21:39:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593929', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:39:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:39:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:39:24] Production.INFO: ==6183== Releasing lock... [2025-03-02 21:39:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:39:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:40:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21:40: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:40:16] Production.INFO: count ==1335 [2025-03-02 21:40:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:40:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:40:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593935', 'tblTempUsageDetail_20' ) start [2025-03-02 21:40:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593935', 'tblTempUsageDetail_20' ) end [2025-03-02 21:40:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593935', 'tblTempVendorCDR_20' ) start [2025-03-02 21:40:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593935', 'tblTempVendorCDR_20' ) end [2025-03-02 21:40:16] Production.INFO: ProcessCDR(1,14593935,1,1,2) [2025-03-02 21:40:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593935,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:40:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593935,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:40:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593935,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:40:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593935,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:40:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593935', 'tblTempUsageDetail_20' ) start [2025-03-02 21:40:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593935', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:40:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:40:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:40:24] Production.INFO: ==6267== Releasing lock... [2025-03-02 21:40:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:40:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:41:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:41:16] Production.INFO: count ==1335 [2025-03-02 21:41:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:41:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593940', 'tblTempUsageDetail_20' ) start [2025-03-02 21:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593940', 'tblTempUsageDetail_20' ) end [2025-03-02 21:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593940', 'tblTempVendorCDR_20' ) start [2025-03-02 21:41:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593940', 'tblTempVendorCDR_20' ) end [2025-03-02 21:41:16] Production.INFO: ProcessCDR(1,14593940,1,1,2) [2025-03-02 21:41:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593940,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:41:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593940,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:41:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593940,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:41:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593940,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:41:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593940', 'tblTempUsageDetail_20' ) start [2025-03-02 21:41:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593940', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:41:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:41:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:41:24] Production.INFO: ==6351== Releasing lock... [2025-03-02 21:41:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:41:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:42:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:42:16] Production.INFO: count ==1335 [2025-03-02 21:42:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:42:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593945', 'tblTempUsageDetail_20' ) start [2025-03-02 21:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593945', 'tblTempUsageDetail_20' ) end [2025-03-02 21:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593945', 'tblTempVendorCDR_20' ) start [2025-03-02 21:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593945', 'tblTempVendorCDR_20' ) end [2025-03-02 21:42:17] Production.INFO: ProcessCDR(1,14593945,1,1,2) [2025-03-02 21:42:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593945,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:42:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593945,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:42:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593945,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:42:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593945,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:42:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593945', 'tblTempUsageDetail_20' ) start [2025-03-02 21:42:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593945', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:42:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:42:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:42:24] Production.INFO: ==6436== Releasing lock... [2025-03-02 21:42:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:42:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:43:03] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21:43:03] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:43:16] Production.INFO: count ==1335 [2025-03-02 21:43:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:43:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:43:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593950', 'tblTempUsageDetail_20' ) start [2025-03-02 21:43:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593950', 'tblTempUsageDetail_20' ) end [2025-03-02 21:43:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593950', 'tblTempVendorCDR_20' ) start [2025-03-02 21:43:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593950', 'tblTempVendorCDR_20' ) end [2025-03-02 21:43:16] Production.INFO: ProcessCDR(1,14593950,1,1,2) [2025-03-02 21:43:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593950,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:43:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593950,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:43:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593950,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:43:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593950,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:43:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593950', 'tblTempUsageDetail_20' ) start [2025-03-02 21:43:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593950', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:43:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:43:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:43:23] Production.INFO: ==6513== Releasing lock... [2025-03-02 21:43:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:43:23] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:44:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:44:17] Production.INFO: count ==1335 [2025-03-02 21:44:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:44:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593955', 'tblTempUsageDetail_20' ) start [2025-03-02 21:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593955', 'tblTempUsageDetail_20' ) end [2025-03-02 21:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593955', 'tblTempVendorCDR_20' ) start [2025-03-02 21:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593955', 'tblTempVendorCDR_20' ) end [2025-03-02 21:44:17] Production.INFO: ProcessCDR(1,14593955,1,1,2) [2025-03-02 21:44:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593955,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:44:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593955,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:44:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593955,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:44:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593955,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593955', 'tblTempUsageDetail_20' ) start [2025-03-02 21:44:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593955', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:44:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:44:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:44:24] Production.INFO: ==6592== Releasing lock... [2025-03-02 21:44:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:44:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:45:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:45:16] Production.INFO: count ==1335 [2025-03-02 21:45:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:45:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593960', 'tblTempUsageDetail_20' ) start [2025-03-02 21:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593960', 'tblTempUsageDetail_20' ) end [2025-03-02 21:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593960', 'tblTempVendorCDR_20' ) start [2025-03-02 21:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593960', 'tblTempVendorCDR_20' ) end [2025-03-02 21:45:16] Production.INFO: ProcessCDR(1,14593960,1,1,2) [2025-03-02 21:45:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593960,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:45:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593960,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:45:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593960,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:45:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593960,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:45:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593960', 'tblTempUsageDetail_20' ) start [2025-03-02 21:45:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593960', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:45:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:45:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:45:24] Production.INFO: ==6665== Releasing lock... [2025-03-02 21:45:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:45:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:46:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:46:17] Production.INFO: count ==1335 [2025-03-02 21:46:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:46:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593965', 'tblTempUsageDetail_20' ) start [2025-03-02 21:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593965', 'tblTempUsageDetail_20' ) end [2025-03-02 21:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593965', 'tblTempVendorCDR_20' ) start [2025-03-02 21:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593965', 'tblTempVendorCDR_20' ) end [2025-03-02 21:46:17] Production.INFO: ProcessCDR(1,14593965,1,1,2) [2025-03-02 21:46:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593965,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:46:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593965,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:46:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593965,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:46:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593965,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:46:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593965', 'tblTempUsageDetail_20' ) start [2025-03-02 21:46:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593965', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:46:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:46:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:46:24] Production.INFO: ==6781== Releasing lock... [2025-03-02 21:46:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:46:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:47:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:47:16] Production.INFO: count ==1335 [2025-03-02 21:47:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:47:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593970', 'tblTempUsageDetail_20' ) start [2025-03-02 21:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593970', 'tblTempUsageDetail_20' ) end [2025-03-02 21:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593970', 'tblTempVendorCDR_20' ) start [2025-03-02 21:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593970', 'tblTempVendorCDR_20' ) end [2025-03-02 21:47:16] Production.INFO: ProcessCDR(1,14593970,1,1,2) [2025-03-02 21:47:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593970,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:47:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593970,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:47:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593970,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:47:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593970,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:47:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593970', 'tblTempUsageDetail_20' ) start [2025-03-02 21:47:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593970', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:47:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:47:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:47:23] Production.INFO: ==6855== Releasing lock... [2025-03-02 21:47:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:47:23] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:48:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:48:17] Production.INFO: count ==1335 [2025-03-02 21:48:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:48:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593975', 'tblTempUsageDetail_20' ) start [2025-03-02 21:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593975', 'tblTempUsageDetail_20' ) end [2025-03-02 21:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593975', 'tblTempVendorCDR_20' ) start [2025-03-02 21:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593975', 'tblTempVendorCDR_20' ) end [2025-03-02 21:48:17] Production.INFO: ProcessCDR(1,14593975,1,1,2) [2025-03-02 21:48:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593975,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:48:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593975,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:48:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593975,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:48:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593975,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:48:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593975', 'tblTempUsageDetail_20' ) start [2025-03-02 21:48:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593975', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:48:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:48:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:48:25] Production.INFO: ==6949== Releasing lock... [2025-03-02 21:48:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:48:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:49:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:49:17] Production.INFO: count ==1335 [2025-03-02 21:49:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:49:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593980', 'tblTempUsageDetail_20' ) start [2025-03-02 21:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593980', 'tblTempUsageDetail_20' ) end [2025-03-02 21:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593980', 'tblTempVendorCDR_20' ) start [2025-03-02 21:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593980', 'tblTempVendorCDR_20' ) end [2025-03-02 21:49:17] Production.INFO: ProcessCDR(1,14593980,1,1,2) [2025-03-02 21:49:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593980,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:49:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593980,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:49:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593980,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:49:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593980,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:49:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593980', 'tblTempUsageDetail_20' ) start [2025-03-02 21:49:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593980', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:49:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:49:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:49:25] Production.INFO: ==7037== Releasing lock... [2025-03-02 21:49:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:49:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:50:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21:50: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:50:16] Production.INFO: count ==1335 [2025-03-02 21:50:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:50:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:50:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593985', 'tblTempUsageDetail_20' ) start [2025-03-02 21:50:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593985', 'tblTempUsageDetail_20' ) end [2025-03-02 21:50:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593985', 'tblTempVendorCDR_20' ) start [2025-03-02 21:50:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593985', 'tblTempVendorCDR_20' ) end [2025-03-02 21:50:16] Production.INFO: ProcessCDR(1,14593985,1,1,2) [2025-03-02 21:50:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593985,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:50:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593985,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:50:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593985,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:50:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593985,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:50:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593985', 'tblTempUsageDetail_20' ) start [2025-03-02 21:50:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593985', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:50:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:50:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:50:25] Production.INFO: ==7120== Releasing lock... [2025-03-02 21:50:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:50:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:51:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:51:17] Production.INFO: count ==1335 [2025-03-02 21:51:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:51:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593991', 'tblTempUsageDetail_20' ) start [2025-03-02 21:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593991', 'tblTempUsageDetail_20' ) end [2025-03-02 21:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593991', 'tblTempVendorCDR_20' ) start [2025-03-02 21:51:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593991', 'tblTempVendorCDR_20' ) end [2025-03-02 21:51:17] Production.INFO: ProcessCDR(1,14593991,1,1,2) [2025-03-02 21:51:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593991,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:51:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593991,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:51:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593991,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:51:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593991,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:51:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593991', 'tblTempUsageDetail_20' ) start [2025-03-02 21:51:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593991', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:51:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:51:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:51:25] Production.INFO: ==7204== Releasing lock... [2025-03-02 21:51:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:51:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:52:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21:52: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:52:16] Production.INFO: count ==1335 [2025-03-02 21:52:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:52:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:52:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593996', 'tblTempUsageDetail_20' ) start [2025-03-02 21:52:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14593996', 'tblTempUsageDetail_20' ) end [2025-03-02 21:52:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593996', 'tblTempVendorCDR_20' ) start [2025-03-02 21:52:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14593996', 'tblTempVendorCDR_20' ) end [2025-03-02 21:52:16] Production.INFO: ProcessCDR(1,14593996,1,1,2) [2025-03-02 21:52:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14593996,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:52:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14593996,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:52:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14593996,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:52:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14593996,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:52:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14593996', 'tblTempUsageDetail_20' ) start [2025-03-02 21:52:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14593996', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:52:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:52:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:52:24] Production.INFO: ==7278== Releasing lock... [2025-03-02 21:52:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:52:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:53:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:53:17] Production.INFO: count ==1335 [2025-03-02 21:53:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:53:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594001', 'tblTempUsageDetail_20' ) start [2025-03-02 21:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594001', 'tblTempUsageDetail_20' ) end [2025-03-02 21:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594001', 'tblTempVendorCDR_20' ) start [2025-03-02 21:53:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594001', 'tblTempVendorCDR_20' ) end [2025-03-02 21:53:17] Production.INFO: ProcessCDR(1,14594001,1,1,2) [2025-03-02 21:53:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594001,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:53:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594001,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:53:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594001,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:53:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594001,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:53:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594001', 'tblTempUsageDetail_20' ) start [2025-03-02 21:53:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594001', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:53:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:53:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:53:25] Production.INFO: ==7355== Releasing lock... [2025-03-02 21:53:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:53:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:54:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21:54: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:54:16] Production.INFO: count ==1335 [2025-03-02 21:54:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:54:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:54:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594006', 'tblTempUsageDetail_20' ) start [2025-03-02 21:54:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594006', 'tblTempUsageDetail_20' ) end [2025-03-02 21:54:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594006', 'tblTempVendorCDR_20' ) start [2025-03-02 21:54:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594006', 'tblTempVendorCDR_20' ) end [2025-03-02 21:54:16] Production.INFO: ProcessCDR(1,14594006,1,1,2) [2025-03-02 21:54:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594006,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:54:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594006,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:54:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594006,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:54:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594006,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:54:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594006', 'tblTempUsageDetail_20' ) start [2025-03-02 21:54:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594006', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:54:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:54:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:54:24] Production.INFO: ==7436== Releasing lock... [2025-03-02 21:54:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:54:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:55:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:55:17] Production.INFO: count ==1335 [2025-03-02 21:55:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:55:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594011', 'tblTempUsageDetail_20' ) start [2025-03-02 21:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594011', 'tblTempUsageDetail_20' ) end [2025-03-02 21:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594011', 'tblTempVendorCDR_20' ) start [2025-03-02 21:55:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594011', 'tblTempVendorCDR_20' ) end [2025-03-02 21:55:17] Production.INFO: ProcessCDR(1,14594011,1,1,2) [2025-03-02 21:55:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594011,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:55:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594011,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:55:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594011,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:55:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594011,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:55:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594011', 'tblTempUsageDetail_20' ) start [2025-03-02 21:55:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594011', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:55:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:55:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:55:25] Production.INFO: ==7521== Releasing lock... [2025-03-02 21:55:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:55:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:56:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21:56: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:56:16] Production.INFO: count ==1335 [2025-03-02 21:56:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:56:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594016', 'tblTempUsageDetail_20' ) start [2025-03-02 21:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594016', 'tblTempUsageDetail_20' ) end [2025-03-02 21:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594016', 'tblTempVendorCDR_20' ) start [2025-03-02 21:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594016', 'tblTempVendorCDR_20' ) end [2025-03-02 21:56:16] Production.INFO: ProcessCDR(1,14594016,1,1,2) [2025-03-02 21:56:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594016,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:56:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594016,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:56:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594016,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:56:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594016,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:56:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594016', 'tblTempUsageDetail_20' ) start [2025-03-02 21:56:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594016', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:56:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:56:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:56:24] Production.INFO: ==7610== Releasing lock... [2025-03-02 21:56:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:56:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:57:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21:57: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:57:16] Production.INFO: count ==1335 [2025-03-02 21:57:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:57:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594021', 'tblTempUsageDetail_20' ) start [2025-03-02 21:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594021', 'tblTempUsageDetail_20' ) end [2025-03-02 21:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594021', 'tblTempVendorCDR_20' ) start [2025-03-02 21:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594021', 'tblTempVendorCDR_20' ) end [2025-03-02 21:57:17] Production.INFO: ProcessCDR(1,14594021,1,1,2) [2025-03-02 21:57:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594021,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:57:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594021,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:57:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594021,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:57:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594021,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:57:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594021', 'tblTempUsageDetail_20' ) start [2025-03-02 21:57:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594021', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:57:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:57:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:57:24] Production.INFO: ==7693== Releasing lock... [2025-03-02 21:57:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:57:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:58:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:58:17] Production.INFO: count ==1335 [2025-03-02 21:58:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:58:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594026', 'tblTempUsageDetail_20' ) start [2025-03-02 21:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594026', 'tblTempUsageDetail_20' ) end [2025-03-02 21:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594026', 'tblTempVendorCDR_20' ) start [2025-03-02 21:58:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594026', 'tblTempVendorCDR_20' ) end [2025-03-02 21:58:17] Production.INFO: ProcessCDR(1,14594026,1,1,2) [2025-03-02 21:58:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594026,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:58:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594026,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:58:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594026,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:58:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594026,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:58:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594026', 'tblTempUsageDetail_20' ) start [2025-03-02 21:58:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594026', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:58:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:58:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:58:25] Production.INFO: ==7771== Releasing lock... [2025-03-02 21:58:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:58:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 21:59:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 21: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 21:59:17] Production.INFO: count ==1335 [2025-03-02 21:59:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 21:59:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 21:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594031', 'tblTempUsageDetail_20' ) start [2025-03-02 21:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594031', 'tblTempUsageDetail_20' ) end [2025-03-02 21:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594031', 'tblTempVendorCDR_20' ) start [2025-03-02 21:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594031', 'tblTempVendorCDR_20' ) end [2025-03-02 21:59:17] Production.INFO: ProcessCDR(1,14594031,1,1,2) [2025-03-02 21:59:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594031,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:59:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594031,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 21:59:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594031,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:59:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594031,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 21:59:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594031', 'tblTempUsageDetail_20' ) start [2025-03-02 21:59:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594031', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 21:59:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 21:59:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 21:59:25] Production.INFO: ==7852== Releasing lock... [2025-03-02 21:59:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 21:59:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:00:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22:00: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:00:16] Production.INFO: count ==1335 [2025-03-02 22:00:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:00:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594037', 'tblTempUsageDetail_20' ) start [2025-03-02 22:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594037', 'tblTempUsageDetail_20' ) end [2025-03-02 22:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594037', 'tblTempVendorCDR_20' ) start [2025-03-02 22:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594037', 'tblTempVendorCDR_20' ) end [2025-03-02 22:00:17] Production.INFO: ProcessCDR(1,14594037,1,1,2) [2025-03-02 22:00:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594037,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:00:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594037,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:00:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594037,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:00:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594037,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:00:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594037', 'tblTempUsageDetail_20' ) start [2025-03-02 22:00:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594037', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:00:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:00:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:00:24] Production.INFO: ==7935== Releasing lock... [2025-03-02 22:00:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:00:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:01:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22:01: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:01:16] Production.INFO: count ==1335 [2025-03-02 22:01:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:01:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594042', 'tblTempUsageDetail_20' ) start [2025-03-02 22:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594042', 'tblTempUsageDetail_20' ) end [2025-03-02 22:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594042', 'tblTempVendorCDR_20' ) start [2025-03-02 22:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594042', 'tblTempVendorCDR_20' ) end [2025-03-02 22:01:17] Production.INFO: ProcessCDR(1,14594042,1,1,2) [2025-03-02 22:01:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594042,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:01:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594042,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:01:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594042,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:01:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594042,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:01:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594042', 'tblTempUsageDetail_20' ) start [2025-03-02 22:01:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594042', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:01:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:01:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:01:25] Production.INFO: ==8020== Releasing lock... [2025-03-02 22:01:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:01:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:02:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22:02: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:02:16] Production.INFO: count ==1335 [2025-03-02 22:02:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:02:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:02:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594047', 'tblTempUsageDetail_20' ) start [2025-03-02 22:02:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594047', 'tblTempUsageDetail_20' ) end [2025-03-02 22:02:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594047', 'tblTempVendorCDR_20' ) start [2025-03-02 22:02:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594047', 'tblTempVendorCDR_20' ) end [2025-03-02 22:02:16] Production.INFO: ProcessCDR(1,14594047,1,1,2) [2025-03-02 22:02:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594047,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:02:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594047,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:02:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594047,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:02:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594047,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:02:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594047', 'tblTempUsageDetail_20' ) start [2025-03-02 22:02:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594047', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:02:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:02:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:02:24] Production.INFO: ==8130== Releasing lock... [2025-03-02 22:02:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:02:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:03:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:03:16] Production.INFO: count ==1335 [2025-03-02 22:03:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:03:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:03:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594052', 'tblTempUsageDetail_20' ) start [2025-03-02 22:03:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594052', 'tblTempUsageDetail_20' ) end [2025-03-02 22:03:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594052', 'tblTempVendorCDR_20' ) start [2025-03-02 22:03:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594052', 'tblTempVendorCDR_20' ) end [2025-03-02 22:03:16] Production.INFO: ProcessCDR(1,14594052,1,1,2) [2025-03-02 22:03:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594052,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:03:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594052,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:03:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594052,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:03:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594052,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:03:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594052', 'tblTempUsageDetail_20' ) start [2025-03-02 22:03:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594052', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:03:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:03:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:03:24] Production.INFO: ==8212== Releasing lock... [2025-03-02 22:03:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:03:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:04:03] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22:04:03] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:04:16] Production.INFO: count ==1335 [2025-03-02 22:04:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:04:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:04:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594057', 'tblTempUsageDetail_20' ) start [2025-03-02 22:04:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594057', 'tblTempUsageDetail_20' ) end [2025-03-02 22:04:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594057', 'tblTempVendorCDR_20' ) start [2025-03-02 22:04:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594057', 'tblTempVendorCDR_20' ) end [2025-03-02 22:04:16] Production.INFO: ProcessCDR(1,14594057,1,1,2) [2025-03-02 22:04:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594057,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:04:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594057,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:04:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594057,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:04:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594057,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:04:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594057', 'tblTempUsageDetail_20' ) start [2025-03-02 22:04:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594057', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:04:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:04:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:04:23] Production.INFO: ==8290== Releasing lock... [2025-03-02 22:04:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:04:23] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:05:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:05:17] Production.INFO: count ==1335 [2025-03-02 22:05:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:05:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594062', 'tblTempUsageDetail_20' ) start [2025-03-02 22:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594062', 'tblTempUsageDetail_20' ) end [2025-03-02 22:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594062', 'tblTempVendorCDR_20' ) start [2025-03-02 22:05:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594062', 'tblTempVendorCDR_20' ) end [2025-03-02 22:05:17] Production.INFO: ProcessCDR(1,14594062,1,1,2) [2025-03-02 22:05:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594062,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:05:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594062,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:05:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594062,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:05:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594062,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:05:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594062', 'tblTempUsageDetail_20' ) start [2025-03-02 22:05:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594062', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:05:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:05:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:05:25] Production.INFO: ==8363== Releasing lock... [2025-03-02 22:05:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:05:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:06:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:06:16] Production.INFO: count ==1335 [2025-03-02 22:06:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:06:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594067', 'tblTempUsageDetail_20' ) start [2025-03-02 22:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594067', 'tblTempUsageDetail_20' ) end [2025-03-02 22:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594067', 'tblTempVendorCDR_20' ) start [2025-03-02 22:06:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594067', 'tblTempVendorCDR_20' ) end [2025-03-02 22:06:16] Production.INFO: ProcessCDR(1,14594067,1,1,2) [2025-03-02 22:06:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594067,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:06:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594067,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:06:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594067,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:06:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594067,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:06:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594067', 'tblTempUsageDetail_20' ) start [2025-03-02 22:06:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594067', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:06:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:06:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:06:24] Production.INFO: ==8448== Releasing lock... [2025-03-02 22:06:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:06:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:07:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:07:17] Production.INFO: count ==1335 [2025-03-02 22:07:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:07:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594072', 'tblTempUsageDetail_20' ) start [2025-03-02 22:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594072', 'tblTempUsageDetail_20' ) end [2025-03-02 22:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594072', 'tblTempVendorCDR_20' ) start [2025-03-02 22:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594072', 'tblTempVendorCDR_20' ) end [2025-03-02 22:07:17] Production.INFO: ProcessCDR(1,14594072,1,1,2) [2025-03-02 22:07:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594072,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:07:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594072,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:07:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594072,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:07:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594072,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:07:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594072', 'tblTempUsageDetail_20' ) start [2025-03-02 22:07:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594072', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:07:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:07:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:07:25] Production.INFO: ==8524== Releasing lock... [2025-03-02 22:07:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:07:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:08:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22:08: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:08:16] Production.INFO: count ==1335 [2025-03-02 22:08:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:08:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594077', 'tblTempUsageDetail_20' ) start [2025-03-02 22:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594077', 'tblTempUsageDetail_20' ) end [2025-03-02 22:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594077', 'tblTempVendorCDR_20' ) start [2025-03-02 22:08:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594077', 'tblTempVendorCDR_20' ) end [2025-03-02 22:08:16] Production.INFO: ProcessCDR(1,14594077,1,1,2) [2025-03-02 22:08:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594077,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:08:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594077,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:08:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594077,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:08:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594077,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:08:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594077', 'tblTempUsageDetail_20' ) start [2025-03-02 22:08:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594077', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:08:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:08:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:08:24] Production.INFO: ==8621== Releasing lock... [2025-03-02 22:08:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:08:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:09:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22:09: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:09:16] Production.INFO: count ==1335 [2025-03-02 22:09:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:09:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594082', 'tblTempUsageDetail_20' ) start [2025-03-02 22:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594082', 'tblTempUsageDetail_20' ) end [2025-03-02 22:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594082', 'tblTempVendorCDR_20' ) start [2025-03-02 22:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594082', 'tblTempVendorCDR_20' ) end [2025-03-02 22:09:16] Production.INFO: ProcessCDR(1,14594082,1,1,2) [2025-03-02 22:09:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594082,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:09:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594082,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:09:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594082,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:09:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594082,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:09:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594082', 'tblTempUsageDetail_20' ) start [2025-03-02 22:09:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594082', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:09:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:09:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:09:24] Production.INFO: ==8702== Releasing lock... [2025-03-02 22:09:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:09:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:10:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:10:17] Production.INFO: count ==1335 [2025-03-02 22:10:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:10:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594088', 'tblTempUsageDetail_20' ) start [2025-03-02 22:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594088', 'tblTempUsageDetail_20' ) end [2025-03-02 22:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594088', 'tblTempVendorCDR_20' ) start [2025-03-02 22:10:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594088', 'tblTempVendorCDR_20' ) end [2025-03-02 22:10:17] Production.INFO: ProcessCDR(1,14594088,1,1,2) [2025-03-02 22:10:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594088,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:10:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594088,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:10:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594088,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:10:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594088,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:10:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594088', 'tblTempUsageDetail_20' ) start [2025-03-02 22:10:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594088', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:10:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:10:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:10:25] Production.INFO: ==8782== Releasing lock... [2025-03-02 22:10:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:10:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:11:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:11:16] Production.INFO: count ==1335 [2025-03-02 22:11:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:11:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:11:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594093', 'tblTempUsageDetail_20' ) start [2025-03-02 22:11:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594093', 'tblTempUsageDetail_20' ) end [2025-03-02 22:11:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594093', 'tblTempVendorCDR_20' ) start [2025-03-02 22:11:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594093', 'tblTempVendorCDR_20' ) end [2025-03-02 22:11:16] Production.INFO: ProcessCDR(1,14594093,1,1,2) [2025-03-02 22:11:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594093,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:11:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594093,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:11:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594093,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:11:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594093,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:11:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594093', 'tblTempUsageDetail_20' ) start [2025-03-02 22:11:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594093', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:11:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:11:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:11:23] Production.INFO: ==8861== Releasing lock... [2025-03-02 22:11:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:11:23] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:12:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22:12: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:12:16] Production.INFO: count ==1335 [2025-03-02 22:12:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:12:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594098', 'tblTempUsageDetail_20' ) start [2025-03-02 22:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594098', 'tblTempUsageDetail_20' ) end [2025-03-02 22:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594098', 'tblTempVendorCDR_20' ) start [2025-03-02 22:12:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594098', 'tblTempVendorCDR_20' ) end [2025-03-02 22:12:16] Production.INFO: ProcessCDR(1,14594098,1,1,2) [2025-03-02 22:12:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594098,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:12:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594098,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:12:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594098,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:12:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594098,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:12:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594098', 'tblTempUsageDetail_20' ) start [2025-03-02 22:12:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594098', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:12:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:12:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:12:24] Production.INFO: ==8943== Releasing lock... [2025-03-02 22:12:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:12:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:13:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22:13: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:13:16] Production.INFO: count ==1335 [2025-03-02 22:13:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:13:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:13:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594103', 'tblTempUsageDetail_20' ) start [2025-03-02 22:13:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594103', 'tblTempUsageDetail_20' ) end [2025-03-02 22:13:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594103', 'tblTempVendorCDR_20' ) start [2025-03-02 22:13:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594103', 'tblTempVendorCDR_20' ) end [2025-03-02 22:13:16] Production.INFO: ProcessCDR(1,14594103,1,1,2) [2025-03-02 22:13:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594103,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:13:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594103,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:13:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594103,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:13:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594103,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:13:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594103', 'tblTempUsageDetail_20' ) start [2025-03-02 22:13:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594103', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:13:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:13:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:13:24] Production.INFO: ==9022== Releasing lock... [2025-03-02 22:13:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:13:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:14:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:14:17] Production.INFO: count ==1335 [2025-03-02 22:14:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:14:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594108', 'tblTempUsageDetail_20' ) start [2025-03-02 22:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594108', 'tblTempUsageDetail_20' ) end [2025-03-02 22:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594108', 'tblTempVendorCDR_20' ) start [2025-03-02 22:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594108', 'tblTempVendorCDR_20' ) end [2025-03-02 22:14:17] Production.INFO: ProcessCDR(1,14594108,1,1,2) [2025-03-02 22:14:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594108,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:14:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594108,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:14:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594108,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:14:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594108,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:14:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594108', 'tblTempUsageDetail_20' ) start [2025-03-02 22:14:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594108', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:14:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:14:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:14:25] Production.INFO: ==9119== Releasing lock... [2025-03-02 22:14:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:14:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:15:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:15:16] Production.INFO: count ==1335 [2025-03-02 22:15:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:15:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594113', 'tblTempUsageDetail_20' ) start [2025-03-02 22:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594113', 'tblTempUsageDetail_20' ) end [2025-03-02 22:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594113', 'tblTempVendorCDR_20' ) start [2025-03-02 22:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594113', 'tblTempVendorCDR_20' ) end [2025-03-02 22:15:16] Production.INFO: ProcessCDR(1,14594113,1,1,2) [2025-03-02 22:15:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594113,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:15:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594113,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:15:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594113,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:15:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594113,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:15:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594113', 'tblTempUsageDetail_20' ) start [2025-03-02 22:15:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594113', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:15:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:15:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:15:24] Production.INFO: ==9204== Releasing lock... [2025-03-02 22:15:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:15:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:16:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:16:16] Production.INFO: count ==1335 [2025-03-02 22:16:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:16:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594118', 'tblTempUsageDetail_20' ) start [2025-03-02 22:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594118', 'tblTempUsageDetail_20' ) end [2025-03-02 22:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594118', 'tblTempVendorCDR_20' ) start [2025-03-02 22:16:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594118', 'tblTempVendorCDR_20' ) end [2025-03-02 22:16:16] Production.INFO: ProcessCDR(1,14594118,1,1,2) [2025-03-02 22:16:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594118,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:16:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594118,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:16:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594118,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:16:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594118,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:16:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594118', 'tblTempUsageDetail_20' ) start [2025-03-02 22:16:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594118', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:16:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:16:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:16:24] Production.INFO: ==9283== Releasing lock... [2025-03-02 22:16:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:16:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:17:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:17:16] Production.INFO: count ==1335 [2025-03-02 22:17:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:17:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594123', 'tblTempUsageDetail_20' ) start [2025-03-02 22:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594123', 'tblTempUsageDetail_20' ) end [2025-03-02 22:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594123', 'tblTempVendorCDR_20' ) start [2025-03-02 22:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594123', 'tblTempVendorCDR_20' ) end [2025-03-02 22:17:17] Production.INFO: ProcessCDR(1,14594123,1,1,2) [2025-03-02 22:17:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594123,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:17:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594123,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:17:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594123,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:17:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594123,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:17:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594123', 'tblTempUsageDetail_20' ) start [2025-03-02 22:17:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594123', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:17:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:17:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:17:25] Production.INFO: ==9419== Releasing lock... [2025-03-02 22:17:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:17:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:18:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:18:17] Production.INFO: count ==1335 [2025-03-02 22:18:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:18:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594128', 'tblTempUsageDetail_20' ) start [2025-03-02 22:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594128', 'tblTempUsageDetail_20' ) end [2025-03-02 22:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594128', 'tblTempVendorCDR_20' ) start [2025-03-02 22:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594128', 'tblTempVendorCDR_20' ) end [2025-03-02 22:18:17] Production.INFO: ProcessCDR(1,14594128,1,1,2) [2025-03-02 22:18:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594128,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:18:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594128,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:18:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594128,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:18:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594128,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:18:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594128', 'tblTempUsageDetail_20' ) start [2025-03-02 22:18:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594128', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:18:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:18:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:18:25] Production.INFO: ==9510== Releasing lock... [2025-03-02 22:18:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:18:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:19:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:19:16] Production.INFO: count ==1335 [2025-03-02 22:19:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:19:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594133', 'tblTempUsageDetail_20' ) start [2025-03-02 22:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594133', 'tblTempUsageDetail_20' ) end [2025-03-02 22:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594133', 'tblTempVendorCDR_20' ) start [2025-03-02 22:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594133', 'tblTempVendorCDR_20' ) end [2025-03-02 22:19:16] Production.INFO: ProcessCDR(1,14594133,1,1,2) [2025-03-02 22:19:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594133,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:19:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594133,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:19:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594133,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:19:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594133,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:19:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594133', 'tblTempUsageDetail_20' ) start [2025-03-02 22:19:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594133', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:19:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:19:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:19:24] Production.INFO: ==9587== Releasing lock... [2025-03-02 22:19:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:19:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:20:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22:20: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:20:16] Production.INFO: count ==1335 [2025-03-02 22:20:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:20:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:20:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594139', 'tblTempUsageDetail_20' ) start [2025-03-02 22:20:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594139', 'tblTempUsageDetail_20' ) end [2025-03-02 22:20:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594139', 'tblTempVendorCDR_20' ) start [2025-03-02 22:20:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594139', 'tblTempVendorCDR_20' ) end [2025-03-02 22:20:16] Production.INFO: ProcessCDR(1,14594139,1,1,2) [2025-03-02 22:20:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594139,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:20:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594139,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:20:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594139,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:20:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594139,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:20:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594139', 'tblTempUsageDetail_20' ) start [2025-03-02 22:20:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594139', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:20:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:20:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:20:24] Production.INFO: ==9660== Releasing lock... [2025-03-02 22:20:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:20:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:21:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:21:17] Production.INFO: count ==1335 [2025-03-02 22:21:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:21:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594144', 'tblTempUsageDetail_20' ) start [2025-03-02 22:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594144', 'tblTempUsageDetail_20' ) end [2025-03-02 22:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594144', 'tblTempVendorCDR_20' ) start [2025-03-02 22:21:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594144', 'tblTempVendorCDR_20' ) end [2025-03-02 22:21:17] Production.INFO: ProcessCDR(1,14594144,1,1,2) [2025-03-02 22:21:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594144,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:21:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594144,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:21:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594144,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:21:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594144,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:21:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594144', 'tblTempUsageDetail_20' ) start [2025-03-02 22:21:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594144', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:21:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:21:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:21:25] Production.INFO: ==9741== Releasing lock... [2025-03-02 22:21:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:21:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:22:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:22:17] Production.INFO: count ==1335 [2025-03-02 22:22:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:22:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594149', 'tblTempUsageDetail_20' ) start [2025-03-02 22:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594149', 'tblTempUsageDetail_20' ) end [2025-03-02 22:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594149', 'tblTempVendorCDR_20' ) start [2025-03-02 22:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594149', 'tblTempVendorCDR_20' ) end [2025-03-02 22:22:17] Production.INFO: ProcessCDR(1,14594149,1,1,2) [2025-03-02 22:22:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594149,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:22:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594149,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:22:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594149,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:22:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594149,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:22:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594149', 'tblTempUsageDetail_20' ) start [2025-03-02 22:22:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594149', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:22:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:22:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:22:25] Production.INFO: ==9848== Releasing lock... [2025-03-02 22:22:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:22:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:23:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22:23: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:23:16] Production.INFO: count ==1335 [2025-03-02 22:23:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:23:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594154', 'tblTempUsageDetail_20' ) start [2025-03-02 22:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594154', 'tblTempUsageDetail_20' ) end [2025-03-02 22:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594154', 'tblTempVendorCDR_20' ) start [2025-03-02 22:23:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594154', 'tblTempVendorCDR_20' ) end [2025-03-02 22:23:17] Production.INFO: ProcessCDR(1,14594154,1,1,2) [2025-03-02 22:23:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594154,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:23:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594154,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:23:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594154,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:23:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594154,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:23:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594154', 'tblTempUsageDetail_20' ) start [2025-03-02 22:23:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594154', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:23:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:23:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:23:24] Production.INFO: ==9952== Releasing lock... [2025-03-02 22:23:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:23:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:24:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22:24: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:24:16] Production.INFO: count ==1335 [2025-03-02 22:24:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:24:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:24:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594159', 'tblTempUsageDetail_20' ) start [2025-03-02 22:24:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594159', 'tblTempUsageDetail_20' ) end [2025-03-02 22:24:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594159', 'tblTempVendorCDR_20' ) start [2025-03-02 22:24:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594159', 'tblTempVendorCDR_20' ) end [2025-03-02 22:24:16] Production.INFO: ProcessCDR(1,14594159,1,1,2) [2025-03-02 22:24:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594159,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:24:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594159,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:24:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594159,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:24:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594159,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594159', 'tblTempUsageDetail_20' ) start [2025-03-02 22:24:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594159', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:24:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:24:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:24:24] Production.INFO: ==10032== Releasing lock... [2025-03-02 22:24:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:24:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:25:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:25:16] Production.INFO: count ==1335 [2025-03-02 22:25:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:25:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594164', 'tblTempUsageDetail_20' ) start [2025-03-02 22:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594164', 'tblTempUsageDetail_20' ) end [2025-03-02 22:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594164', 'tblTempVendorCDR_20' ) start [2025-03-02 22:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594164', 'tblTempVendorCDR_20' ) end [2025-03-02 22:25:16] Production.INFO: ProcessCDR(1,14594164,1,1,2) [2025-03-02 22:25:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594164,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:25:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594164,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:25:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594164,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:25:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594164,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594164', 'tblTempUsageDetail_20' ) start [2025-03-02 22:25:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594164', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:25:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:25:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:25:24] Production.INFO: ==10104== Releasing lock... [2025-03-02 22:25:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:25:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:26:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:26:17] Production.INFO: count ==1335 [2025-03-02 22:26:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:26:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594169', 'tblTempUsageDetail_20' ) start [2025-03-02 22:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594169', 'tblTempUsageDetail_20' ) end [2025-03-02 22:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594169', 'tblTempVendorCDR_20' ) start [2025-03-02 22:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594169', 'tblTempVendorCDR_20' ) end [2025-03-02 22:26:17] Production.INFO: ProcessCDR(1,14594169,1,1,2) [2025-03-02 22:26:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594169,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:26:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594169,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:26:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594169,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:26:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594169,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:26:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594169', 'tblTempUsageDetail_20' ) start [2025-03-02 22:26:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594169', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:26:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:26:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:26:25] Production.INFO: ==10186== Releasing lock... [2025-03-02 22:26:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:26:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:27:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22:27: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:27:16] Production.INFO: count ==1335 [2025-03-02 22:27:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:27:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594174', 'tblTempUsageDetail_20' ) start [2025-03-02 22:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594174', 'tblTempUsageDetail_20' ) end [2025-03-02 22:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594174', 'tblTempVendorCDR_20' ) start [2025-03-02 22:27:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594174', 'tblTempVendorCDR_20' ) end [2025-03-02 22:27:17] Production.INFO: ProcessCDR(1,14594174,1,1,2) [2025-03-02 22:27:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594174,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:27:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594174,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:27:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594174,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:27:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594174,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:27:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594174', 'tblTempUsageDetail_20' ) start [2025-03-02 22:27:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594174', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:27:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:27:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:27:25] Production.INFO: ==10265== Releasing lock... [2025-03-02 22:27:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:27:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:28:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:28:17] Production.INFO: count ==1335 [2025-03-02 22:28:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:28:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594179', 'tblTempUsageDetail_20' ) start [2025-03-02 22:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594179', 'tblTempUsageDetail_20' ) end [2025-03-02 22:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594179', 'tblTempVendorCDR_20' ) start [2025-03-02 22:28:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594179', 'tblTempVendorCDR_20' ) end [2025-03-02 22:28:17] Production.INFO: ProcessCDR(1,14594179,1,1,2) [2025-03-02 22:28:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594179,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:28:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594179,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:28:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594179,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:28:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594179,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:28:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594179', 'tblTempUsageDetail_20' ) start [2025-03-02 22:28:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594179', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:28:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:28:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:28:25] Production.INFO: ==10352== Releasing lock... [2025-03-02 22:28:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:28:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:29:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:29:16] Production.INFO: count ==1335 [2025-03-02 22:29:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:29:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594184', 'tblTempUsageDetail_20' ) start [2025-03-02 22:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594184', 'tblTempUsageDetail_20' ) end [2025-03-02 22:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594184', 'tblTempVendorCDR_20' ) start [2025-03-02 22:29:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594184', 'tblTempVendorCDR_20' ) end [2025-03-02 22:29:16] Production.INFO: ProcessCDR(1,14594184,1,1,2) [2025-03-02 22:29:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594184,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:29:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594184,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:29:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594184,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:29:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594184,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:29:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594184', 'tblTempUsageDetail_20' ) start [2025-03-02 22:29:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594184', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:29:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:29:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:29:24] Production.INFO: ==10444== Releasing lock... [2025-03-02 22:29:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:29:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:30:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22:30: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:30:17] Production.INFO: count ==1335 [2025-03-02 22:30:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:30:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594189', 'tblTempUsageDetail_20' ) start [2025-03-02 22:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594189', 'tblTempUsageDetail_20' ) end [2025-03-02 22:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594189', 'tblTempVendorCDR_20' ) start [2025-03-02 22:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594189', 'tblTempVendorCDR_20' ) end [2025-03-02 22:30:17] Production.INFO: ProcessCDR(1,14594189,1,1,2) [2025-03-02 22:30:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594189,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:30:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594189,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:30:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594189,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:30:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594189,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:30:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594189', 'tblTempUsageDetail_20' ) start [2025-03-02 22:30:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594189', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:30:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:30:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:30:25] Production.INFO: ==10532== Releasing lock... [2025-03-02 22:30:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:30:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:31:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22:31: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:31:16] Production.INFO: count ==1335 [2025-03-02 22:31:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:31:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594195', 'tblTempUsageDetail_20' ) start [2025-03-02 22:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594195', 'tblTempUsageDetail_20' ) end [2025-03-02 22:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594195', 'tblTempVendorCDR_20' ) start [2025-03-02 22:31:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594195', 'tblTempVendorCDR_20' ) end [2025-03-02 22:31:16] Production.INFO: ProcessCDR(1,14594195,1,1,2) [2025-03-02 22:31:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594195,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:31:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594195,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:31:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594195,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:31:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594195,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:31:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594195', 'tblTempUsageDetail_20' ) start [2025-03-02 22:31:22] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594195', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:31:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:31:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:31:23] Production.INFO: ==10611== Releasing lock... [2025-03-02 22:31:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:31:23] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:32:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:32:16] Production.INFO: count ==1335 [2025-03-02 22:32:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:32:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594200', 'tblTempUsageDetail_20' ) start [2025-03-02 22:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594200', 'tblTempUsageDetail_20' ) end [2025-03-02 22:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594200', 'tblTempVendorCDR_20' ) start [2025-03-02 22:32:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594200', 'tblTempVendorCDR_20' ) end [2025-03-02 22:32:17] Production.INFO: ProcessCDR(1,14594200,1,1,2) [2025-03-02 22:32:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594200,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:32:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594200,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:32:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594200,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:32:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594200,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:32:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594200', 'tblTempUsageDetail_20' ) start [2025-03-02 22:32:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594200', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:32:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:32:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:32:24] Production.INFO: ==10733== Releasing lock... [2025-03-02 22:32:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:32:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:33:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22:33: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:33:16] Production.INFO: count ==1335 [2025-03-02 22:33:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:33:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594205', 'tblTempUsageDetail_20' ) start [2025-03-02 22:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594205', 'tblTempUsageDetail_20' ) end [2025-03-02 22:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594205', 'tblTempVendorCDR_20' ) start [2025-03-02 22:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594205', 'tblTempVendorCDR_20' ) end [2025-03-02 22:33:16] Production.INFO: ProcessCDR(1,14594205,1,1,2) [2025-03-02 22:33:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594205,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:33:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594205,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:33:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594205,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:33:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594205,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:33:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594205', 'tblTempUsageDetail_20' ) start [2025-03-02 22:33:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594205', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:33:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:33:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:33:24] Production.INFO: ==10831== Releasing lock... [2025-03-02 22:33:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:33:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:34:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22:34: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:34:16] Production.INFO: count ==1335 [2025-03-02 22:34:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:34:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594210', 'tblTempUsageDetail_20' ) start [2025-03-02 22:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594210', 'tblTempUsageDetail_20' ) end [2025-03-02 22:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594210', 'tblTempVendorCDR_20' ) start [2025-03-02 22:34:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594210', 'tblTempVendorCDR_20' ) end [2025-03-02 22:34:17] Production.INFO: ProcessCDR(1,14594210,1,1,2) [2025-03-02 22:34:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594210,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:34:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594210,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:34:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594210,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:34:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594210,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:34:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594210', 'tblTempUsageDetail_20' ) start [2025-03-02 22:34:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594210', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:34:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:34:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:34:25] Production.INFO: ==10928== Releasing lock... [2025-03-02 22:34:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:34:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:35:03] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22:35:03] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:35:15] Production.INFO: count ==1335 [2025-03-02 22:35:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:35:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:35:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594215', 'tblTempUsageDetail_20' ) start [2025-03-02 22:35:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594215', 'tblTempUsageDetail_20' ) end [2025-03-02 22:35:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594215', 'tblTempVendorCDR_20' ) start [2025-03-02 22:35:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594215', 'tblTempVendorCDR_20' ) end [2025-03-02 22:35:16] Production.INFO: ProcessCDR(1,14594215,1,1,2) [2025-03-02 22:35:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594215,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:35:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594215,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:35:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594215,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:35:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594215,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:35:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594215', 'tblTempUsageDetail_20' ) start [2025-03-02 22:35:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594215', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:35:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:35:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:35:23] Production.INFO: ==11010== Releasing lock... [2025-03-02 22:35:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:35:23] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:36:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22:36: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:36:16] Production.INFO: count ==1335 [2025-03-02 22:36:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:36:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594220', 'tblTempUsageDetail_20' ) start [2025-03-02 22:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594220', 'tblTempUsageDetail_20' ) end [2025-03-02 22:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594220', 'tblTempVendorCDR_20' ) start [2025-03-02 22:36:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594220', 'tblTempVendorCDR_20' ) end [2025-03-02 22:36:17] Production.INFO: ProcessCDR(1,14594220,1,1,2) [2025-03-02 22:36:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594220,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:36:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594220,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:36:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594220,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:36:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594220,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:36:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594220', 'tblTempUsageDetail_20' ) start [2025-03-02 22:36:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594220', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:36:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:36:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:36:25] Production.INFO: ==11111== Releasing lock... [2025-03-02 22:36:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:36:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:37:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:37:17] Production.INFO: count ==1335 [2025-03-02 22:37:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:37:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594225', 'tblTempUsageDetail_20' ) start [2025-03-02 22:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594225', 'tblTempUsageDetail_20' ) end [2025-03-02 22:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594225', 'tblTempVendorCDR_20' ) start [2025-03-02 22:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594225', 'tblTempVendorCDR_20' ) end [2025-03-02 22:37:17] Production.INFO: ProcessCDR(1,14594225,1,1,2) [2025-03-02 22:37:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594225,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:37:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594225,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:37:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594225,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:37:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594225,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:37:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594225', 'tblTempUsageDetail_20' ) start [2025-03-02 22:37:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594225', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:37:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:37:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:37:24] Production.INFO: ==11199== Releasing lock... [2025-03-02 22:37:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:37:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:38:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22:38: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:38:16] Production.INFO: count ==1335 [2025-03-02 22:38:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:38:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594230', 'tblTempUsageDetail_20' ) start [2025-03-02 22:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594230', 'tblTempUsageDetail_20' ) end [2025-03-02 22:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594230', 'tblTempVendorCDR_20' ) start [2025-03-02 22:38:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594230', 'tblTempVendorCDR_20' ) end [2025-03-02 22:38:17] Production.INFO: ProcessCDR(1,14594230,1,1,2) [2025-03-02 22:38:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594230,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:38:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594230,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:38:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594230,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:38:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594230,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594230', 'tblTempUsageDetail_20' ) start [2025-03-02 22:38:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594230', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:38:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:38:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:38:24] Production.INFO: ==11293== Releasing lock... [2025-03-02 22:38:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:38:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:39:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:39:16] Production.INFO: count ==1335 [2025-03-02 22:39:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:39:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594235', 'tblTempUsageDetail_20' ) start [2025-03-02 22:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594235', 'tblTempUsageDetail_20' ) end [2025-03-02 22:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594235', 'tblTempVendorCDR_20' ) start [2025-03-02 22:39:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594235', 'tblTempVendorCDR_20' ) end [2025-03-02 22:39:16] Production.INFO: ProcessCDR(1,14594235,1,1,2) [2025-03-02 22:39:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594235,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:39:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594235,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:39:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594235,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:39:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594235,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:39:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594235', 'tblTempUsageDetail_20' ) start [2025-03-02 22:39:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594235', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:39:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:39:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:39:24] Production.INFO: ==11369== Releasing lock... [2025-03-02 22:39:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:39:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:40:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:40:17] Production.INFO: count ==1335 [2025-03-02 22:40:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:40:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594241', 'tblTempUsageDetail_20' ) start [2025-03-02 22:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594241', 'tblTempUsageDetail_20' ) end [2025-03-02 22:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594241', 'tblTempVendorCDR_20' ) start [2025-03-02 22:40:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594241', 'tblTempVendorCDR_20' ) end [2025-03-02 22:40:17] Production.INFO: ProcessCDR(1,14594241,1,1,2) [2025-03-02 22:40:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594241,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:40:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594241,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:40:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594241,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:40:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594241,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:40:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594241', 'tblTempUsageDetail_20' ) start [2025-03-02 22:40:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594241', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:40:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:40:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:40:25] Production.INFO: ==11455== Releasing lock... [2025-03-02 22:40:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:40:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:41:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:41:17] Production.INFO: count ==1335 [2025-03-02 22:41:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:41:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594246', 'tblTempUsageDetail_20' ) start [2025-03-02 22:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594246', 'tblTempUsageDetail_20' ) end [2025-03-02 22:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594246', 'tblTempVendorCDR_20' ) start [2025-03-02 22:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594246', 'tblTempVendorCDR_20' ) end [2025-03-02 22:41:17] Production.INFO: ProcessCDR(1,14594246,1,1,2) [2025-03-02 22:41:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594246,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:41:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594246,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:41:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594246,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:41:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594246,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:41:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594246', 'tblTempUsageDetail_20' ) start [2025-03-02 22:41:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594246', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:41:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:41:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:41:24] Production.INFO: ==11553== Releasing lock... [2025-03-02 22:41:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:41:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:42:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:42:16] Production.INFO: count ==1335 [2025-03-02 22:42:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:42:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594251', 'tblTempUsageDetail_20' ) start [2025-03-02 22:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594251', 'tblTempUsageDetail_20' ) end [2025-03-02 22:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594251', 'tblTempVendorCDR_20' ) start [2025-03-02 22:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594251', 'tblTempVendorCDR_20' ) end [2025-03-02 22:42:16] Production.INFO: ProcessCDR(1,14594251,1,1,2) [2025-03-02 22:42:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594251,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:42:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594251,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:42:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594251,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:42:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594251,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:42:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594251', 'tblTempUsageDetail_20' ) start [2025-03-02 22:42:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594251', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:42:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:42:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:42:24] Production.INFO: ==11639== Releasing lock... [2025-03-02 22:42:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:42:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:43:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22:43: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:43:16] Production.INFO: count ==1335 [2025-03-02 22:43:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:43:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594256', 'tblTempUsageDetail_20' ) start [2025-03-02 22:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594256', 'tblTempUsageDetail_20' ) end [2025-03-02 22:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594256', 'tblTempVendorCDR_20' ) start [2025-03-02 22:43:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594256', 'tblTempVendorCDR_20' ) end [2025-03-02 22:43:17] Production.INFO: ProcessCDR(1,14594256,1,1,2) [2025-03-02 22:43:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594256,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:43:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594256,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:43:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594256,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:43:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594256,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:43:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594256', 'tblTempUsageDetail_20' ) start [2025-03-02 22:43:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594256', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:43:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:43:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:43:25] Production.INFO: ==11725== Releasing lock... [2025-03-02 22:43:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:43:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:44:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:44:16] Production.INFO: count ==1335 [2025-03-02 22:44:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:44:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594261', 'tblTempUsageDetail_20' ) start [2025-03-02 22:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594261', 'tblTempUsageDetail_20' ) end [2025-03-02 22:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594261', 'tblTempVendorCDR_20' ) start [2025-03-02 22:44:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594261', 'tblTempVendorCDR_20' ) end [2025-03-02 22:44:16] Production.INFO: ProcessCDR(1,14594261,1,1,2) [2025-03-02 22:44:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594261,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:44:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594261,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:44:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594261,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:44:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594261,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:44:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594261', 'tblTempUsageDetail_20' ) start [2025-03-02 22:44:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594261', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:44:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:44:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:44:24] Production.INFO: ==11806== Releasing lock... [2025-03-02 22:44:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:44:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:45:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:45:17] Production.INFO: count ==1335 [2025-03-02 22:45:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:45:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594266', 'tblTempUsageDetail_20' ) start [2025-03-02 22:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594266', 'tblTempUsageDetail_20' ) end [2025-03-02 22:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594266', 'tblTempVendorCDR_20' ) start [2025-03-02 22:45:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594266', 'tblTempVendorCDR_20' ) end [2025-03-02 22:45:17] Production.INFO: ProcessCDR(1,14594266,1,1,2) [2025-03-02 22:45:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594266,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:45:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594266,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:45:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594266,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:45:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594266,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:45:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594266', 'tblTempUsageDetail_20' ) start [2025-03-02 22:45:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594266', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:45:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:45:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:45:25] Production.INFO: ==11885== Releasing lock... [2025-03-02 22:45:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:45:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:46:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:46:16] Production.INFO: count ==1335 [2025-03-02 22:46:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:46:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:46:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594271', 'tblTempUsageDetail_20' ) start [2025-03-02 22:46:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594271', 'tblTempUsageDetail_20' ) end [2025-03-02 22:46:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594271', 'tblTempVendorCDR_20' ) start [2025-03-02 22:46:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594271', 'tblTempVendorCDR_20' ) end [2025-03-02 22:46:16] Production.INFO: ProcessCDR(1,14594271,1,1,2) [2025-03-02 22:46:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594271,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:46:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594271,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:46:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594271,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:46:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594271,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:46:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594271', 'tblTempUsageDetail_20' ) start [2025-03-02 22:46:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594271', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:46:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:46:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:46:24] Production.INFO: ==11964== Releasing lock... [2025-03-02 22:46:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:46:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:47:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:47:17] Production.INFO: count ==1335 [2025-03-02 22:47:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:47:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594276', 'tblTempUsageDetail_20' ) start [2025-03-02 22:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594276', 'tblTempUsageDetail_20' ) end [2025-03-02 22:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594276', 'tblTempVendorCDR_20' ) start [2025-03-02 22:47:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594276', 'tblTempVendorCDR_20' ) end [2025-03-02 22:47:17] Production.INFO: ProcessCDR(1,14594276,1,1,2) [2025-03-02 22:47:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594276,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:47:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594276,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:47:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594276,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:47:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594276,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:47:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594276', 'tblTempUsageDetail_20' ) start [2025-03-02 22:47:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594276', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:47:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:47:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:47:25] Production.INFO: ==12057== Releasing lock... [2025-03-02 22:47:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:47:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:48:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:48:16] Production.INFO: count ==1335 [2025-03-02 22:48:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:48:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594281', 'tblTempUsageDetail_20' ) start [2025-03-02 22:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594281', 'tblTempUsageDetail_20' ) end [2025-03-02 22:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594281', 'tblTempVendorCDR_20' ) start [2025-03-02 22:48:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594281', 'tblTempVendorCDR_20' ) end [2025-03-02 22:48:16] Production.INFO: ProcessCDR(1,14594281,1,1,2) [2025-03-02 22:48:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594281,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:48:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594281,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:48:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594281,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:48:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594281,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:48:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594281', 'tblTempUsageDetail_20' ) start [2025-03-02 22:48:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594281', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:48:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:48:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:48:24] Production.INFO: ==12179== Releasing lock... [2025-03-02 22:48:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:48:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:49:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22:49: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:49:17] Production.INFO: count ==1335 [2025-03-02 22:49:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:49:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594286', 'tblTempUsageDetail_20' ) start [2025-03-02 22:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594286', 'tblTempUsageDetail_20' ) end [2025-03-02 22:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594286', 'tblTempVendorCDR_20' ) start [2025-03-02 22:49:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594286', 'tblTempVendorCDR_20' ) end [2025-03-02 22:49:17] Production.INFO: ProcessCDR(1,14594286,1,1,2) [2025-03-02 22:49:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594286,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:49:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594286,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:49:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594286,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:49:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594286,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:49:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594286', 'tblTempUsageDetail_20' ) start [2025-03-02 22:49:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594286', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:49:27] Production.ERROR: **Email Sent Status 0 [2025-03-02 22:49:27] Production.ERROR: **Email Sent message Something wrong with sending mail.SMTP Error: data not accepted.SMTP server error: DATA END command failed Detail: 4.3.111 Temporary server error. Please try again later MRH1 [Hostname=YQXPR01MB3575.CANPRD01.PROD.OUTLOOK.COM] SMTP code: 451 ( Email Address: eleanor@onswitchit.ca) [2025-03-02 22:49:27] Production.INFO: ==12253== Releasing lock... [2025-03-02 22:49:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:49:27] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:50:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:50:17] Production.INFO: count ==1335 [2025-03-02 22:50:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:50:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594292', 'tblTempUsageDetail_20' ) start [2025-03-02 22:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594292', 'tblTempUsageDetail_20' ) end [2025-03-02 22:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594292', 'tblTempVendorCDR_20' ) start [2025-03-02 22:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594292', 'tblTempVendorCDR_20' ) end [2025-03-02 22:50:17] Production.INFO: ProcessCDR(1,14594292,1,1,2) [2025-03-02 22:50:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594292,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:50:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594292,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:50:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594292,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:50:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594292,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:50:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594292', 'tblTempUsageDetail_20' ) start [2025-03-02 22:50:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594292', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:50:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:50:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:50:25] Production.INFO: ==12325== Releasing lock... [2025-03-02 22:50:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:50:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:51:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:51:16] Production.INFO: count ==1335 [2025-03-02 22:51:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:51:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594297', 'tblTempUsageDetail_20' ) start [2025-03-02 22:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594297', 'tblTempUsageDetail_20' ) end [2025-03-02 22:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594297', 'tblTempVendorCDR_20' ) start [2025-03-02 22:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594297', 'tblTempVendorCDR_20' ) end [2025-03-02 22:51:16] Production.INFO: ProcessCDR(1,14594297,1,1,2) [2025-03-02 22:51:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594297,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:51:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594297,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:51:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594297,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:51:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594297,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:51:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594297', 'tblTempUsageDetail_20' ) start [2025-03-02 22:51:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594297', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:51:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:51:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:51:24] Production.INFO: ==12404== Releasing lock... [2025-03-02 22:51:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:51:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:52:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22:52: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:52:16] Production.INFO: count ==1335 [2025-03-02 22:52:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:52:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594302', 'tblTempUsageDetail_20' ) start [2025-03-02 22:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594302', 'tblTempUsageDetail_20' ) end [2025-03-02 22:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594302', 'tblTempVendorCDR_20' ) start [2025-03-02 22:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594302', 'tblTempVendorCDR_20' ) end [2025-03-02 22:52:17] Production.INFO: ProcessCDR(1,14594302,1,1,2) [2025-03-02 22:52:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594302,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:52:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594302,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:52:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594302,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:52:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594302,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:52:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594302', 'tblTempUsageDetail_20' ) start [2025-03-02 22:52:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594302', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:52:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:52:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:52:24] Production.INFO: ==12488== Releasing lock... [2025-03-02 22:52:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:52:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:53:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:53:16] Production.INFO: count ==1335 [2025-03-02 22:53:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:53:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594307', 'tblTempUsageDetail_20' ) start [2025-03-02 22:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594307', 'tblTempUsageDetail_20' ) end [2025-03-02 22:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594307', 'tblTempVendorCDR_20' ) start [2025-03-02 22:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594307', 'tblTempVendorCDR_20' ) end [2025-03-02 22:53:16] Production.INFO: ProcessCDR(1,14594307,1,1,2) [2025-03-02 22:53:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594307,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:53:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594307,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:53:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594307,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:53:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594307,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594307', 'tblTempUsageDetail_20' ) start [2025-03-02 22:53:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594307', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:53:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:53:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:53:24] Production.INFO: ==12569== Releasing lock... [2025-03-02 22:53:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:53:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:54:03] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22:54:03] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:54:15] Production.INFO: count ==1335 [2025-03-02 22:54:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:54:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:54:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594312', 'tblTempUsageDetail_20' ) start [2025-03-02 22:54:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594312', 'tblTempUsageDetail_20' ) end [2025-03-02 22:54:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594312', 'tblTempVendorCDR_20' ) start [2025-03-02 22:54:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594312', 'tblTempVendorCDR_20' ) end [2025-03-02 22:54:16] Production.INFO: ProcessCDR(1,14594312,1,1,2) [2025-03-02 22:54:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594312,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:54:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594312,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:54:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594312,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:54:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594312,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:54:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594312', 'tblTempUsageDetail_20' ) start [2025-03-02 22:54:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594312', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:54:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:54:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:54:23] Production.INFO: ==12657== Releasing lock... [2025-03-02 22:54:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:54:23] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:55:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22:55: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:55:16] Production.INFO: count ==1335 [2025-03-02 22:55:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:55:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594317', 'tblTempUsageDetail_20' ) start [2025-03-02 22:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594317', 'tblTempUsageDetail_20' ) end [2025-03-02 22:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594317', 'tblTempVendorCDR_20' ) start [2025-03-02 22:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594317', 'tblTempVendorCDR_20' ) end [2025-03-02 22:55:16] Production.INFO: ProcessCDR(1,14594317,1,1,2) [2025-03-02 22:55:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594317,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:55:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594317,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:55:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594317,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:55:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594317,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594317', 'tblTempUsageDetail_20' ) start [2025-03-02 22:55:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594317', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:55:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:55:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:55:24] Production.INFO: ==12734== Releasing lock... [2025-03-02 22:55:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:55:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:56:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22:56: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:56:16] Production.INFO: count ==1335 [2025-03-02 22:56:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:56:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594322', 'tblTempUsageDetail_20' ) start [2025-03-02 22:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594322', 'tblTempUsageDetail_20' ) end [2025-03-02 22:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594322', 'tblTempVendorCDR_20' ) start [2025-03-02 22:56:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594322', 'tblTempVendorCDR_20' ) end [2025-03-02 22:56:16] Production.INFO: ProcessCDR(1,14594322,1,1,2) [2025-03-02 22:56:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594322,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:56:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594322,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:56:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594322,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:56:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594322,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:56:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594322', 'tblTempUsageDetail_20' ) start [2025-03-02 22:56:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594322', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:56:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:56:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:56:24] Production.INFO: ==12813== Releasing lock... [2025-03-02 22:56:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:56:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:57:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:57:17] Production.INFO: count ==1335 [2025-03-02 22:57:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:57:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594327', 'tblTempUsageDetail_20' ) start [2025-03-02 22:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594327', 'tblTempUsageDetail_20' ) end [2025-03-02 22:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594327', 'tblTempVendorCDR_20' ) start [2025-03-02 22:57:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594327', 'tblTempVendorCDR_20' ) end [2025-03-02 22:57:17] Production.INFO: ProcessCDR(1,14594327,1,1,2) [2025-03-02 22:57:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594327,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:57:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594327,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:57:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594327,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:57:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594327,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:57:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594327', 'tblTempUsageDetail_20' ) start [2025-03-02 22:57:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594327', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:57:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:57:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:57:25] Production.INFO: ==12904== Releasing lock... [2025-03-02 22:57:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:57:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:58:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:58:16] Production.INFO: count ==1335 [2025-03-02 22:58:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:58:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594332', 'tblTempUsageDetail_20' ) start [2025-03-02 22:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594332', 'tblTempUsageDetail_20' ) end [2025-03-02 22:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594332', 'tblTempVendorCDR_20' ) start [2025-03-02 22:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594332', 'tblTempVendorCDR_20' ) end [2025-03-02 22:58:16] Production.INFO: ProcessCDR(1,14594332,1,1,2) [2025-03-02 22:58:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594332,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:58:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594332,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:58:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594332,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:58:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594332,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:58:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594332', 'tblTempUsageDetail_20' ) start [2025-03-02 22:58:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594332', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:58:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:58:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:58:24] Production.INFO: ==12981== Releasing lock... [2025-03-02 22:58:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:58:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 22:59:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 22: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 22:59:16] Production.INFO: count ==1335 [2025-03-02 22:59:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 22:59:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 22:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594337', 'tblTempUsageDetail_20' ) start [2025-03-02 22:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594337', 'tblTempUsageDetail_20' ) end [2025-03-02 22:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594337', 'tblTempVendorCDR_20' ) start [2025-03-02 22:59:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594337', 'tblTempVendorCDR_20' ) end [2025-03-02 22:59:16] Production.INFO: ProcessCDR(1,14594337,1,1,2) [2025-03-02 22:59:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594337,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:59:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594337,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 22:59:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594337,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:59:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594337,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 22:59:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594337', 'tblTempUsageDetail_20' ) start [2025-03-02 22:59:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594337', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 22:59:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 22:59:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 22:59:23] Production.INFO: ==13068== Releasing lock... [2025-03-02 22:59:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 22:59:23] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:00:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:00:17] Production.INFO: count ==1335 [2025-03-02 23:00:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:00:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594343', 'tblTempUsageDetail_20' ) start [2025-03-02 23:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594343', 'tblTempUsageDetail_20' ) end [2025-03-02 23:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594343', 'tblTempVendorCDR_20' ) start [2025-03-02 23:00:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594343', 'tblTempVendorCDR_20' ) end [2025-03-02 23:00:17] Production.INFO: ProcessCDR(1,14594343,1,1,2) [2025-03-02 23:00:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594343,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:00:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594343,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:00:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594343,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:00:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594343,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:00:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594343', 'tblTempUsageDetail_20' ) start [2025-03-02 23:00:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594343', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:00:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:00:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:00:25] Production.INFO: ==13145== Releasing lock... [2025-03-02 23:00:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:00:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:01:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23:01: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:01:16] Production.INFO: count ==1335 [2025-03-02 23:01:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:01:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594348', 'tblTempUsageDetail_20' ) start [2025-03-02 23:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594348', 'tblTempUsageDetail_20' ) end [2025-03-02 23:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594348', 'tblTempVendorCDR_20' ) start [2025-03-02 23:01:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594348', 'tblTempVendorCDR_20' ) end [2025-03-02 23:01:17] Production.INFO: ProcessCDR(1,14594348,1,1,2) [2025-03-02 23:01:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594348,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:01:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594348,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:01:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594348,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:01:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594348,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:01:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594348', 'tblTempUsageDetail_20' ) start [2025-03-02 23:01:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594348', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:01:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:01:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:01:25] Production.INFO: ==13331== Releasing lock... [2025-03-02 23:01:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:01:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:02:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:02:17] Production.INFO: count ==1335 [2025-03-02 23:02:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:02:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594353', 'tblTempUsageDetail_20' ) start [2025-03-02 23:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594353', 'tblTempUsageDetail_20' ) end [2025-03-02 23:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594353', 'tblTempVendorCDR_20' ) start [2025-03-02 23:02:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594353', 'tblTempVendorCDR_20' ) end [2025-03-02 23:02:17] Production.INFO: ProcessCDR(1,14594353,1,1,2) [2025-03-02 23:02:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594353,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:02:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594353,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:02:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594353,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:02:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594353,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:02:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594353', 'tblTempUsageDetail_20' ) start [2025-03-02 23:02:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594353', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:02:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:02:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:02:25] Production.INFO: ==13410== Releasing lock... [2025-03-02 23:02:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:02:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:03:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:03:16] Production.INFO: count ==1335 [2025-03-02 23:03:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:03:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594358', 'tblTempUsageDetail_20' ) start [2025-03-02 23:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594358', 'tblTempUsageDetail_20' ) end [2025-03-02 23:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594358', 'tblTempVendorCDR_20' ) start [2025-03-02 23:03:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594358', 'tblTempVendorCDR_20' ) end [2025-03-02 23:03:17] Production.INFO: ProcessCDR(1,14594358,1,1,2) [2025-03-02 23:03:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594358,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:03:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594358,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:03:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594358,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:03:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594358,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:03:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594358', 'tblTempUsageDetail_20' ) start [2025-03-02 23:03:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594358', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:03:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:03:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:03:24] Production.INFO: ==13544== Releasing lock... [2025-03-02 23:03:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:03:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:04:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:04:17] Production.INFO: count ==1335 [2025-03-02 23:04:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:04:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594363', 'tblTempUsageDetail_20' ) start [2025-03-02 23:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594363', 'tblTempUsageDetail_20' ) end [2025-03-02 23:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594363', 'tblTempVendorCDR_20' ) start [2025-03-02 23:04:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594363', 'tblTempVendorCDR_20' ) end [2025-03-02 23:04:17] Production.INFO: ProcessCDR(1,14594363,1,1,2) [2025-03-02 23:04:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594363,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:04:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594363,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:04:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594363,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:04:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594363,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:04:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594363', 'tblTempUsageDetail_20' ) start [2025-03-02 23:04:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594363', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:04:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:04:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:04:24] Production.INFO: ==13633== Releasing lock... [2025-03-02 23:04:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:04:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:05:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23:05: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:05:16] Production.INFO: count ==1335 [2025-03-02 23:05:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:05:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594368', 'tblTempUsageDetail_20' ) start [2025-03-02 23:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594368', 'tblTempUsageDetail_20' ) end [2025-03-02 23:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594368', 'tblTempVendorCDR_20' ) start [2025-03-02 23:05:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594368', 'tblTempVendorCDR_20' ) end [2025-03-02 23:05:16] Production.INFO: ProcessCDR(1,14594368,1,1,2) [2025-03-02 23:05:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594368,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:05:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594368,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:05:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594368,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:05:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594368,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:05:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594368', 'tblTempUsageDetail_20' ) start [2025-03-02 23:05:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594368', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:05:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:05:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:05:24] Production.INFO: ==13791== Releasing lock... [2025-03-02 23:05:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:05:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:06:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:06:17] Production.INFO: count ==1335 [2025-03-02 23:06:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:06:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:06:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594373', 'tblTempUsageDetail_20' ) start [2025-03-02 23:06:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594373', 'tblTempUsageDetail_20' ) end [2025-03-02 23:06:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594373', 'tblTempVendorCDR_20' ) start [2025-03-02 23:06:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594373', 'tblTempVendorCDR_20' ) end [2025-03-02 23:06:18] Production.INFO: ProcessCDR(1,14594373,1,1,2) [2025-03-02 23:06:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594373,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:06:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594373,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:06:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594373,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:06:23] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594373,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:06:23] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594373', 'tblTempUsageDetail_20' ) start [2025-03-02 23:06:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594373', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:06:26] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:06:26] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:06:26] Production.INFO: ==13883== Releasing lock... [2025-03-02 23:06:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:06:26] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:07:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:07:16] Production.INFO: count ==1335 [2025-03-02 23:07:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:07:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594378', 'tblTempUsageDetail_20' ) start [2025-03-02 23:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594378', 'tblTempUsageDetail_20' ) end [2025-03-02 23:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594378', 'tblTempVendorCDR_20' ) start [2025-03-02 23:07:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594378', 'tblTempVendorCDR_20' ) end [2025-03-02 23:07:17] Production.INFO: ProcessCDR(1,14594378,1,1,2) [2025-03-02 23:07:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594378,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:07:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594378,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:07:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594378,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:07:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594378,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:07:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594378', 'tblTempUsageDetail_20' ) start [2025-03-02 23:07:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594378', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:07:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:07:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:07:25] Production.INFO: ==13971== Releasing lock... [2025-03-02 23:07:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:07:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:08:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23:08: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:08:16] Production.INFO: count ==1335 [2025-03-02 23:08:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:08:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594383', 'tblTempUsageDetail_20' ) start [2025-03-02 23:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594383', 'tblTempUsageDetail_20' ) end [2025-03-02 23:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594383', 'tblTempVendorCDR_20' ) start [2025-03-02 23:08:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594383', 'tblTempVendorCDR_20' ) end [2025-03-02 23:08:17] Production.INFO: ProcessCDR(1,14594383,1,1,2) [2025-03-02 23:08:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594383,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:08:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594383,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:08:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594383,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:08:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594383,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:08:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594383', 'tblTempUsageDetail_20' ) start [2025-03-02 23:08:25] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594383', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:08:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:08:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:08:25] Production.INFO: ==14123== Releasing lock... [2025-03-02 23:08:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:08:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:09:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23:09: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:09:16] Production.INFO: count ==1335 [2025-03-02 23:09:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:09:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594388', 'tblTempUsageDetail_20' ) start [2025-03-02 23:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594388', 'tblTempUsageDetail_20' ) end [2025-03-02 23:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594388', 'tblTempVendorCDR_20' ) start [2025-03-02 23:09:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594388', 'tblTempVendorCDR_20' ) end [2025-03-02 23:09:16] Production.INFO: ProcessCDR(1,14594388,1,1,2) [2025-03-02 23:09:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594388,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:09:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594388,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:09:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594388,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:09:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594388,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:09:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594388', 'tblTempUsageDetail_20' ) start [2025-03-02 23:09:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594388', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:09:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:09:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:09:24] Production.INFO: ==14206== Releasing lock... [2025-03-02 23:09:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:09:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:10:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:10:17] Production.INFO: count ==1335 [2025-03-02 23:10:18] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:10:18] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594394', 'tblTempUsageDetail_20' ) start [2025-03-02 23:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594394', 'tblTempUsageDetail_20' ) end [2025-03-02 23:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594394', 'tblTempVendorCDR_20' ) start [2025-03-02 23:10:18] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594394', 'tblTempVendorCDR_20' ) end [2025-03-02 23:10:18] Production.INFO: ProcessCDR(1,14594394,1,1,2) [2025-03-02 23:10:18] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594394,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:10:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594394,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:10:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594394,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:10:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594394,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:10:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594394', 'tblTempUsageDetail_20' ) start [2025-03-02 23:10:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594394', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:10:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:10:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:10:25] Production.INFO: ==14292== Releasing lock... [2025-03-02 23:10:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:10:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:11:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:11:16] Production.INFO: count ==1335 [2025-03-02 23:11:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:11:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594399', 'tblTempUsageDetail_20' ) start [2025-03-02 23:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594399', 'tblTempUsageDetail_20' ) end [2025-03-02 23:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594399', 'tblTempVendorCDR_20' ) start [2025-03-02 23:11:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594399', 'tblTempVendorCDR_20' ) end [2025-03-02 23:11:17] Production.INFO: ProcessCDR(1,14594399,1,1,2) [2025-03-02 23:11:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594399,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:11:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594399,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:11:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594399,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:11:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594399,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:11:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594399', 'tblTempUsageDetail_20' ) start [2025-03-02 23:11:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594399', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:11:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:11:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:11:24] Production.INFO: ==14385== Releasing lock... [2025-03-02 23:11:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:11:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:12:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:12:17] Production.INFO: count ==1335 [2025-03-02 23:12:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:12:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594404', 'tblTempUsageDetail_20' ) start [2025-03-02 23:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594404', 'tblTempUsageDetail_20' ) end [2025-03-02 23:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594404', 'tblTempVendorCDR_20' ) start [2025-03-02 23:12:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594404', 'tblTempVendorCDR_20' ) end [2025-03-02 23:12:17] Production.INFO: ProcessCDR(1,14594404,1,1,2) [2025-03-02 23:12:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594404,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:12:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594404,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:12:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594404,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:12:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594404,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:12:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594404', 'tblTempUsageDetail_20' ) start [2025-03-02 23:12:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594404', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:12:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:12:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:12:25] Production.INFO: ==14535== Releasing lock... [2025-03-02 23:12:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:12:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:13:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23:13: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:13:16] Production.INFO: count ==1335 [2025-03-02 23:13:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:13:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594409', 'tblTempUsageDetail_20' ) start [2025-03-02 23:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594409', 'tblTempUsageDetail_20' ) end [2025-03-02 23:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594409', 'tblTempVendorCDR_20' ) start [2025-03-02 23:13:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594409', 'tblTempVendorCDR_20' ) end [2025-03-02 23:13:17] Production.INFO: ProcessCDR(1,14594409,1,1,2) [2025-03-02 23:13:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594409,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:13:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594409,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:13:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594409,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:13:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594409,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:13:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594409', 'tblTempUsageDetail_20' ) start [2025-03-02 23:13:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594409', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:13:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:13:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:13:24] Production.INFO: ==14616== Releasing lock... [2025-03-02 23:13:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:13:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:14:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:14:17] Production.INFO: count ==1335 [2025-03-02 23:14:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:14:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594414', 'tblTempUsageDetail_20' ) start [2025-03-02 23:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594414', 'tblTempUsageDetail_20' ) end [2025-03-02 23:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594414', 'tblTempVendorCDR_20' ) start [2025-03-02 23:14:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594414', 'tblTempVendorCDR_20' ) end [2025-03-02 23:14:17] Production.INFO: ProcessCDR(1,14594414,1,1,2) [2025-03-02 23:14:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594414,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:14:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594414,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:14:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594414,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:14:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594414,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:14:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594414', 'tblTempUsageDetail_20' ) start [2025-03-02 23:14:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594414', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:14:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:14:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:14:24] Production.INFO: ==14704== Releasing lock... [2025-03-02 23:14:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:14:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:15:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:15:16] Production.INFO: count ==1335 [2025-03-02 23:15:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:15:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594419', 'tblTempUsageDetail_20' ) start [2025-03-02 23:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594419', 'tblTempUsageDetail_20' ) end [2025-03-02 23:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594419', 'tblTempVendorCDR_20' ) start [2025-03-02 23:15:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594419', 'tblTempVendorCDR_20' ) end [2025-03-02 23:15:16] Production.INFO: ProcessCDR(1,14594419,1,1,2) [2025-03-02 23:15:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594419,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:15:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594419,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:15:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594419,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:15:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594419,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:15:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594419', 'tblTempUsageDetail_20' ) start [2025-03-02 23:15:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594419', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:15:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:15:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:15:24] Production.INFO: ==14868== Releasing lock... [2025-03-02 23:15:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:15:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:16:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:16:17] Production.INFO: count ==1335 [2025-03-02 23:16:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:16:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594424', 'tblTempUsageDetail_20' ) start [2025-03-02 23:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594424', 'tblTempUsageDetail_20' ) end [2025-03-02 23:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594424', 'tblTempVendorCDR_20' ) start [2025-03-02 23:16:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594424', 'tblTempVendorCDR_20' ) end [2025-03-02 23:16:17] Production.INFO: ProcessCDR(1,14594424,1,1,2) [2025-03-02 23:16:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594424,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:16:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594424,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:16:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594424,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:16:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594424,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:16:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594424', 'tblTempUsageDetail_20' ) start [2025-03-02 23:16:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594424', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:16:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:16:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:16:25] Production.INFO: ==14956== Releasing lock... [2025-03-02 23:16:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:16:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:17:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:17:16] Production.INFO: count ==1335 [2025-03-02 23:17:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:17:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594429', 'tblTempUsageDetail_20' ) start [2025-03-02 23:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594429', 'tblTempUsageDetail_20' ) end [2025-03-02 23:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594429', 'tblTempVendorCDR_20' ) start [2025-03-02 23:17:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594429', 'tblTempVendorCDR_20' ) end [2025-03-02 23:17:17] Production.INFO: ProcessCDR(1,14594429,1,1,2) [2025-03-02 23:17:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594429,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:17:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594429,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:17:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594429,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:17:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594429,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:17:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594429', 'tblTempUsageDetail_20' ) start [2025-03-02 23:17:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594429', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:17:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:17:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:17:24] Production.INFO: ==15043== Releasing lock... [2025-03-02 23:17:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:17:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:18:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23:18: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:18:17] Production.INFO: count ==1335 [2025-03-02 23:18:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:18:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594434', 'tblTempUsageDetail_20' ) start [2025-03-02 23:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594434', 'tblTempUsageDetail_20' ) end [2025-03-02 23:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594434', 'tblTempVendorCDR_20' ) start [2025-03-02 23:18:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594434', 'tblTempVendorCDR_20' ) end [2025-03-02 23:18:17] Production.INFO: ProcessCDR(1,14594434,1,1,2) [2025-03-02 23:18:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594434,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:18:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594434,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:18:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594434,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:18:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594434,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:18:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594434', 'tblTempUsageDetail_20' ) start [2025-03-02 23:18:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594434', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:18:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:18:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:18:24] Production.INFO: ==15130== Releasing lock... [2025-03-02 23:18:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:18:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:19:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:19:16] Production.INFO: count ==1335 [2025-03-02 23:19:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:19:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594439', 'tblTempUsageDetail_20' ) start [2025-03-02 23:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594439', 'tblTempUsageDetail_20' ) end [2025-03-02 23:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594439', 'tblTempVendorCDR_20' ) start [2025-03-02 23:19:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594439', 'tblTempVendorCDR_20' ) end [2025-03-02 23:19:16] Production.INFO: ProcessCDR(1,14594439,1,1,2) [2025-03-02 23:19:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594439,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:19:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594439,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:19:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594439,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:19:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594439,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:19:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594439', 'tblTempUsageDetail_20' ) start [2025-03-02 23:19:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594439', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:19:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:19:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:19:23] Production.INFO: ==15240== Releasing lock... [2025-03-02 23:19:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:19:23] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:20:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:20:17] Production.INFO: count ==1335 [2025-03-02 23:20:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:20:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594444', 'tblTempUsageDetail_20' ) start [2025-03-02 23:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594444', 'tblTempUsageDetail_20' ) end [2025-03-02 23:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594444', 'tblTempVendorCDR_20' ) start [2025-03-02 23:20:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594444', 'tblTempVendorCDR_20' ) end [2025-03-02 23:20:17] Production.INFO: ProcessCDR(1,14594444,1,1,2) [2025-03-02 23:20:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594444,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:20:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594444,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:20:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594444,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:20:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594444,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:20:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594444', 'tblTempUsageDetail_20' ) start [2025-03-02 23:20:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594444', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:20:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:20:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:20:24] Production.INFO: ==15321== Releasing lock... [2025-03-02 23:20:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:20:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:21:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23:21: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:21:16] Production.INFO: count ==1335 [2025-03-02 23:21:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:21:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594450', 'tblTempUsageDetail_20' ) start [2025-03-02 23:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594450', 'tblTempUsageDetail_20' ) end [2025-03-02 23:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594450', 'tblTempVendorCDR_20' ) start [2025-03-02 23:21:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594450', 'tblTempVendorCDR_20' ) end [2025-03-02 23:21:16] Production.INFO: ProcessCDR(1,14594450,1,1,2) [2025-03-02 23:21:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594450,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:21:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594450,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:21:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594450,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:21:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594450,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:21:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594450', 'tblTempUsageDetail_20' ) start [2025-03-02 23:21:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594450', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:21:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:21:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:21:24] Production.INFO: ==15397== Releasing lock... [2025-03-02 23:21:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:21:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:22:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:22:17] Production.INFO: count ==1335 [2025-03-02 23:22:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:22:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594455', 'tblTempUsageDetail_20' ) start [2025-03-02 23:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594455', 'tblTempUsageDetail_20' ) end [2025-03-02 23:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594455', 'tblTempVendorCDR_20' ) start [2025-03-02 23:22:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594455', 'tblTempVendorCDR_20' ) end [2025-03-02 23:22:17] Production.INFO: ProcessCDR(1,14594455,1,1,2) [2025-03-02 23:22:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594455,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:22:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594455,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:22:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594455,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:22:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594455,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:22:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594455', 'tblTempUsageDetail_20' ) start [2025-03-02 23:22:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594455', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:22:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:22:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:22:24] Production.INFO: ==15479== Releasing lock... [2025-03-02 23:22:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:22:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:23:03] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23:23:03] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:23:16] Production.INFO: count ==1335 [2025-03-02 23:23:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:23:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594460', 'tblTempUsageDetail_20' ) start [2025-03-02 23:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594460', 'tblTempUsageDetail_20' ) end [2025-03-02 23:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594460', 'tblTempVendorCDR_20' ) start [2025-03-02 23:23:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594460', 'tblTempVendorCDR_20' ) end [2025-03-02 23:23:16] Production.INFO: ProcessCDR(1,14594460,1,1,2) [2025-03-02 23:23:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594460,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:23:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594460,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:23:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594460,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:23:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594460,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:23:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594460', 'tblTempUsageDetail_20' ) start [2025-03-02 23:23:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594460', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:23:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:23:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:23:24] Production.INFO: ==15570== Releasing lock... [2025-03-02 23:23:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:23:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:24:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23:24: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:24:16] Production.INFO: count ==1335 [2025-03-02 23:24:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:24:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:24:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594465', 'tblTempUsageDetail_20' ) start [2025-03-02 23:24:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594465', 'tblTempUsageDetail_20' ) end [2025-03-02 23:24:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594465', 'tblTempVendorCDR_20' ) start [2025-03-02 23:24:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594465', 'tblTempVendorCDR_20' ) end [2025-03-02 23:24:16] Production.INFO: ProcessCDR(1,14594465,1,1,2) [2025-03-02 23:24:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594465,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:24:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594465,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:24:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594465,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:24:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594465,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:24:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594465', 'tblTempUsageDetail_20' ) start [2025-03-02 23:24:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594465', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:24:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:24:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:24:24] Production.INFO: ==15663== Releasing lock... [2025-03-02 23:24:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:24:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:25:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:25:16] Production.INFO: count ==1335 [2025-03-02 23:25:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:25:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594470', 'tblTempUsageDetail_20' ) start [2025-03-02 23:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594470', 'tblTempUsageDetail_20' ) end [2025-03-02 23:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594470', 'tblTempVendorCDR_20' ) start [2025-03-02 23:25:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594470', 'tblTempVendorCDR_20' ) end [2025-03-02 23:25:16] Production.INFO: ProcessCDR(1,14594470,1,1,2) [2025-03-02 23:25:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594470,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:25:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594470,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:25:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594470,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:25:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594470,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:25:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594470', 'tblTempUsageDetail_20' ) start [2025-03-02 23:25:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594470', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:25:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:25:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:25:24] Production.INFO: ==15756== Releasing lock... [2025-03-02 23:25:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:25:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:26:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:26:16] Production.INFO: count ==1335 [2025-03-02 23:26:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:26:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594475', 'tblTempUsageDetail_20' ) start [2025-03-02 23:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594475', 'tblTempUsageDetail_20' ) end [2025-03-02 23:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594475', 'tblTempVendorCDR_20' ) start [2025-03-02 23:26:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594475', 'tblTempVendorCDR_20' ) end [2025-03-02 23:26:17] Production.INFO: ProcessCDR(1,14594475,1,1,2) [2025-03-02 23:26:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594475,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:26:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594475,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:26:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594475,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:26:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594475,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:26:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594475', 'tblTempUsageDetail_20' ) start [2025-03-02 23:26:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594475', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:26:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:26:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:26:25] Production.INFO: ==15847== Releasing lock... [2025-03-02 23:26:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:26:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:27:03] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23:27:03] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:27:15] Production.INFO: count ==1335 [2025-03-02 23:27:15] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:27:15] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:27:15] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594480', 'tblTempUsageDetail_20' ) start [2025-03-02 23:27:15] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594480', 'tblTempUsageDetail_20' ) end [2025-03-02 23:27:15] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594480', 'tblTempVendorCDR_20' ) start [2025-03-02 23:27:15] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594480', 'tblTempVendorCDR_20' ) end [2025-03-02 23:27:15] Production.INFO: ProcessCDR(1,14594480,1,1,2) [2025-03-02 23:27:15] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594480,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:27:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594480,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:27:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594480,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:27:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594480,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:27:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594480', 'tblTempUsageDetail_20' ) start [2025-03-02 23:27:22] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594480', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:27:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:27:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:27:23] Production.INFO: ==15936== Releasing lock... [2025-03-02 23:27:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:27:23] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:28:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23:28: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:28:16] Production.INFO: count ==1335 [2025-03-02 23:28:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:28:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:28:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594485', 'tblTempUsageDetail_20' ) start [2025-03-02 23:28:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594485', 'tblTempUsageDetail_20' ) end [2025-03-02 23:28:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594485', 'tblTempVendorCDR_20' ) start [2025-03-02 23:28:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594485', 'tblTempVendorCDR_20' ) end [2025-03-02 23:28:16] Production.INFO: ProcessCDR(1,14594485,1,1,2) [2025-03-02 23:28:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594485,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:28:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594485,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:28:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594485,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:28:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594485,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:28:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594485', 'tblTempUsageDetail_20' ) start [2025-03-02 23:28:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594485', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:28:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:28:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:28:24] Production.INFO: ==16019== Releasing lock... [2025-03-02 23:28:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:28:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:29:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:29:17] Production.INFO: count ==1335 [2025-03-02 23:29:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:29:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594490', 'tblTempUsageDetail_20' ) start [2025-03-02 23:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594490', 'tblTempUsageDetail_20' ) end [2025-03-02 23:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594490', 'tblTempVendorCDR_20' ) start [2025-03-02 23:29:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594490', 'tblTempVendorCDR_20' ) end [2025-03-02 23:29:17] Production.INFO: ProcessCDR(1,14594490,1,1,2) [2025-03-02 23:29:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594490,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:29:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594490,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:29:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594490,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:29:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594490,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:29:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594490', 'tblTempUsageDetail_20' ) start [2025-03-02 23:29:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594490', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:29:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:29:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:29:24] Production.INFO: ==16109== Releasing lock... [2025-03-02 23:29:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:29:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:30:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:30:17] Production.INFO: count ==1335 [2025-03-02 23:30:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:30:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594495', 'tblTempUsageDetail_20' ) start [2025-03-02 23:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594495', 'tblTempUsageDetail_20' ) end [2025-03-02 23:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594495', 'tblTempVendorCDR_20' ) start [2025-03-02 23:30:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594495', 'tblTempVendorCDR_20' ) end [2025-03-02 23:30:17] Production.INFO: ProcessCDR(1,14594495,1,1,2) [2025-03-02 23:30:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594495,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:30:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594495,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:30:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594495,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:30:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594495,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:30:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594495', 'tblTempUsageDetail_20' ) start [2025-03-02 23:30:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594495', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:30:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:30:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:30:25] Production.INFO: ==16188== Releasing lock... [2025-03-02 23:30:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:30:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:31:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:31:17] Production.INFO: count ==1335 [2025-03-02 23:31:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:31:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594501', 'tblTempUsageDetail_20' ) start [2025-03-02 23:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594501', 'tblTempUsageDetail_20' ) end [2025-03-02 23:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594501', 'tblTempVendorCDR_20' ) start [2025-03-02 23:31:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594501', 'tblTempVendorCDR_20' ) end [2025-03-02 23:31:17] Production.INFO: ProcessCDR(1,14594501,1,1,2) [2025-03-02 23:31:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594501,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:31:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594501,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:31:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594501,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:31:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594501,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:31:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594501', 'tblTempUsageDetail_20' ) start [2025-03-02 23:31:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594501', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:31:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:31:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:31:24] Production.INFO: ==16262== Releasing lock... [2025-03-02 23:31:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:31:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:32:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:32:16] Production.INFO: count ==1335 [2025-03-02 23:32:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:32:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594506', 'tblTempUsageDetail_20' ) start [2025-03-02 23:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594506', 'tblTempUsageDetail_20' ) end [2025-03-02 23:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594506', 'tblTempVendorCDR_20' ) start [2025-03-02 23:32:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594506', 'tblTempVendorCDR_20' ) end [2025-03-02 23:32:16] Production.INFO: ProcessCDR(1,14594506,1,1,2) [2025-03-02 23:32:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594506,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:32:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594506,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:32:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594506,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:32:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594506,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:32:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594506', 'tblTempUsageDetail_20' ) start [2025-03-02 23:32:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594506', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:32:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:32:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:32:24] Production.INFO: ==16335== Releasing lock... [2025-03-02 23:32:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:32:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:33:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23:33: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:33:16] Production.INFO: count ==1335 [2025-03-02 23:33:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:33:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594511', 'tblTempUsageDetail_20' ) start [2025-03-02 23:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594511', 'tblTempUsageDetail_20' ) end [2025-03-02 23:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594511', 'tblTempVendorCDR_20' ) start [2025-03-02 23:33:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594511', 'tblTempVendorCDR_20' ) end [2025-03-02 23:33:16] Production.INFO: ProcessCDR(1,14594511,1,1,2) [2025-03-02 23:33:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594511,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:33:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594511,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:33:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594511,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:33:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594511,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:33:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594511', 'tblTempUsageDetail_20' ) start [2025-03-02 23:33:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594511', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:33:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:33:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:33:24] Production.INFO: ==16408== Releasing lock... [2025-03-02 23:33:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:33:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:34:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23:34: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:34:16] Production.INFO: count ==1335 [2025-03-02 23:34:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:34:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594516', 'tblTempUsageDetail_20' ) start [2025-03-02 23:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594516', 'tblTempUsageDetail_20' ) end [2025-03-02 23:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594516', 'tblTempVendorCDR_20' ) start [2025-03-02 23:34:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594516', 'tblTempVendorCDR_20' ) end [2025-03-02 23:34:16] Production.INFO: ProcessCDR(1,14594516,1,1,2) [2025-03-02 23:34:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594516,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:34:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594516,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:34:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594516,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:34:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594516,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:34:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594516', 'tblTempUsageDetail_20' ) start [2025-03-02 23:34:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594516', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:34:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:34:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:34:24] Production.INFO: ==16524== Releasing lock... [2025-03-02 23:34:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:34:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:35:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:35:16] Production.INFO: count ==1335 [2025-03-02 23:35:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:35:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594521', 'tblTempUsageDetail_20' ) start [2025-03-02 23:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594521', 'tblTempUsageDetail_20' ) end [2025-03-02 23:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594521', 'tblTempVendorCDR_20' ) start [2025-03-02 23:35:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594521', 'tblTempVendorCDR_20' ) end [2025-03-02 23:35:17] Production.INFO: ProcessCDR(1,14594521,1,1,2) [2025-03-02 23:35:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594521,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:35:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594521,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:35:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594521,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:35:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594521,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:35:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594521', 'tblTempUsageDetail_20' ) start [2025-03-02 23:35:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594521', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:35:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:35:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:35:24] Production.INFO: ==16605== Releasing lock... [2025-03-02 23:35:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:35:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:36:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23:36: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:36:16] Production.INFO: count ==1335 [2025-03-02 23:36:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:36:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594526', 'tblTempUsageDetail_20' ) start [2025-03-02 23:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594526', 'tblTempUsageDetail_20' ) end [2025-03-02 23:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594526', 'tblTempVendorCDR_20' ) start [2025-03-02 23:36:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594526', 'tblTempVendorCDR_20' ) end [2025-03-02 23:36:16] Production.INFO: ProcessCDR(1,14594526,1,1,2) [2025-03-02 23:36:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594526,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:36:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594526,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:36:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594526,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:36:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594526,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:36:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594526', 'tblTempUsageDetail_20' ) start [2025-03-02 23:36:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594526', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:36:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:36:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:36:24] Production.INFO: ==16695== Releasing lock... [2025-03-02 23:36:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:36:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:37:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:37:16] Production.INFO: count ==1335 [2025-03-02 23:37:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:37:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594531', 'tblTempUsageDetail_20' ) start [2025-03-02 23:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594531', 'tblTempUsageDetail_20' ) end [2025-03-02 23:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594531', 'tblTempVendorCDR_20' ) start [2025-03-02 23:37:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594531', 'tblTempVendorCDR_20' ) end [2025-03-02 23:37:17] Production.INFO: ProcessCDR(1,14594531,1,1,2) [2025-03-02 23:37:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594531,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:37:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594531,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:37:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594531,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:37:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594531,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:37:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594531', 'tblTempUsageDetail_20' ) start [2025-03-02 23:37:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594531', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:37:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:37:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:37:24] Production.INFO: ==16788== Releasing lock... [2025-03-02 23:37:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:37:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:38:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23:38: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:38:16] Production.INFO: count ==1335 [2025-03-02 23:38:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:38:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594536', 'tblTempUsageDetail_20' ) start [2025-03-02 23:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594536', 'tblTempUsageDetail_20' ) end [2025-03-02 23:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594536', 'tblTempVendorCDR_20' ) start [2025-03-02 23:38:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594536', 'tblTempVendorCDR_20' ) end [2025-03-02 23:38:16] Production.INFO: ProcessCDR(1,14594536,1,1,2) [2025-03-02 23:38:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594536,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:38:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594536,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:38:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594536,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:38:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594536,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:38:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594536', 'tblTempUsageDetail_20' ) start [2025-03-02 23:38:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594536', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:38:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:38:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:38:24] Production.INFO: ==16877== Releasing lock... [2025-03-02 23:38:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:38:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:39:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:39:17] Production.INFO: count ==1335 [2025-03-02 23:39:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:39:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594541', 'tblTempUsageDetail_20' ) start [2025-03-02 23:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594541', 'tblTempUsageDetail_20' ) end [2025-03-02 23:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594541', 'tblTempVendorCDR_20' ) start [2025-03-02 23:39:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594541', 'tblTempVendorCDR_20' ) end [2025-03-02 23:39:17] Production.INFO: ProcessCDR(1,14594541,1,1,2) [2025-03-02 23:39:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594541,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:39:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594541,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:39:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594541,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:39:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594541,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:39:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594541', 'tblTempUsageDetail_20' ) start [2025-03-02 23:39:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594541', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:39:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:39:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:39:25] Production.INFO: ==16965== Releasing lock... [2025-03-02 23:39:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:39:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:40:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23:40: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:40:16] Production.INFO: count ==1335 [2025-03-02 23:40:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:40:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:40:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594546', 'tblTempUsageDetail_20' ) start [2025-03-02 23:40:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594546', 'tblTempUsageDetail_20' ) end [2025-03-02 23:40:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594546', 'tblTempVendorCDR_20' ) start [2025-03-02 23:40:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594546', 'tblTempVendorCDR_20' ) end [2025-03-02 23:40:16] Production.INFO: ProcessCDR(1,14594546,1,1,2) [2025-03-02 23:40:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594546,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:40:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594546,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:40:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594546,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:40:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594546,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:40:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594546', 'tblTempUsageDetail_20' ) start [2025-03-02 23:40:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594546', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:40:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:40:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:40:24] Production.INFO: ==17044== Releasing lock... [2025-03-02 23:40:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:40:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:41:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:41:17] Production.INFO: count ==1335 [2025-03-02 23:41:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:41:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594552', 'tblTempUsageDetail_20' ) start [2025-03-02 23:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594552', 'tblTempUsageDetail_20' ) end [2025-03-02 23:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594552', 'tblTempVendorCDR_20' ) start [2025-03-02 23:41:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594552', 'tblTempVendorCDR_20' ) end [2025-03-02 23:41:17] Production.INFO: ProcessCDR(1,14594552,1,1,2) [2025-03-02 23:41:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594552,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:41:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594552,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:41:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594552,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:41:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594552,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:41:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594552', 'tblTempUsageDetail_20' ) start [2025-03-02 23:41:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594552', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:41:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:41:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:41:24] Production.INFO: ==17121== Releasing lock... [2025-03-02 23:41:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:41:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:42:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:42:16] Production.INFO: count ==1335 [2025-03-02 23:42:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:42:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:42:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594557', 'tblTempUsageDetail_20' ) start [2025-03-02 23:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594557', 'tblTempUsageDetail_20' ) end [2025-03-02 23:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594557', 'tblTempVendorCDR_20' ) start [2025-03-02 23:42:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594557', 'tblTempVendorCDR_20' ) end [2025-03-02 23:42:17] Production.INFO: ProcessCDR(1,14594557,1,1,2) [2025-03-02 23:42:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594557,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:42:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594557,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:42:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594557,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:42:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594557,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:42:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594557', 'tblTempUsageDetail_20' ) start [2025-03-02 23:42:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594557', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:42:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:42:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:42:24] Production.INFO: ==17204== Releasing lock... [2025-03-02 23:42:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:42:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:43:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23:43: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:43:16] Production.INFO: count ==1335 [2025-03-02 23:43:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:43:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:43:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594562', 'tblTempUsageDetail_20' ) start [2025-03-02 23:43:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594562', 'tblTempUsageDetail_20' ) end [2025-03-02 23:43:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594562', 'tblTempVendorCDR_20' ) start [2025-03-02 23:43:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594562', 'tblTempVendorCDR_20' ) end [2025-03-02 23:43:16] Production.INFO: ProcessCDR(1,14594562,1,1,2) [2025-03-02 23:43:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594562,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:43:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594562,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:43:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594562,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:43:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594562,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:43:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594562', 'tblTempUsageDetail_20' ) start [2025-03-02 23:43:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594562', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:43:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:43:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:43:24] Production.INFO: ==17284== Releasing lock... [2025-03-02 23:43:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:43:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:44:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:44:17] Production.INFO: count ==1335 [2025-03-02 23:44:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:44:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594567', 'tblTempUsageDetail_20' ) start [2025-03-02 23:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594567', 'tblTempUsageDetail_20' ) end [2025-03-02 23:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594567', 'tblTempVendorCDR_20' ) start [2025-03-02 23:44:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594567', 'tblTempVendorCDR_20' ) end [2025-03-02 23:44:17] Production.INFO: ProcessCDR(1,14594567,1,1,2) [2025-03-02 23:44:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594567,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:44:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594567,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:44:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594567,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:44:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594567,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:44:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594567', 'tblTempUsageDetail_20' ) start [2025-03-02 23:44:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594567', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:44:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:44:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:44:24] Production.INFO: ==17358== Releasing lock... [2025-03-02 23:44:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:44:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:45:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:45:16] Production.INFO: count ==1335 [2025-03-02 23:45:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:45:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594572', 'tblTempUsageDetail_20' ) start [2025-03-02 23:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594572', 'tblTempUsageDetail_20' ) end [2025-03-02 23:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594572', 'tblTempVendorCDR_20' ) start [2025-03-02 23:45:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594572', 'tblTempVendorCDR_20' ) end [2025-03-02 23:45:16] Production.INFO: ProcessCDR(1,14594572,1,1,2) [2025-03-02 23:45:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594572,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:45:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594572,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:45:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594572,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:45:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594572,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:45:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594572', 'tblTempUsageDetail_20' ) start [2025-03-02 23:45:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594572', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:45:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:45:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:45:24] Production.INFO: ==17445== Releasing lock... [2025-03-02 23:45:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:45:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:46:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:46:17] Production.INFO: count ==1335 [2025-03-02 23:46:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:46:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594577', 'tblTempUsageDetail_20' ) start [2025-03-02 23:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594577', 'tblTempUsageDetail_20' ) end [2025-03-02 23:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594577', 'tblTempVendorCDR_20' ) start [2025-03-02 23:46:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594577', 'tblTempVendorCDR_20' ) end [2025-03-02 23:46:17] Production.INFO: ProcessCDR(1,14594577,1,1,2) [2025-03-02 23:46:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594577,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:46:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594577,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:46:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594577,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:46:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594577,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:46:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594577', 'tblTempUsageDetail_20' ) start [2025-03-02 23:46:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594577', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:46:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:46:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:46:25] Production.INFO: ==17529== Releasing lock... [2025-03-02 23:46:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:46:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:47:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:47:16] Production.INFO: count ==1335 [2025-03-02 23:47:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:47:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594582', 'tblTempUsageDetail_20' ) start [2025-03-02 23:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594582', 'tblTempUsageDetail_20' ) end [2025-03-02 23:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594582', 'tblTempVendorCDR_20' ) start [2025-03-02 23:47:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594582', 'tblTempVendorCDR_20' ) end [2025-03-02 23:47:16] Production.INFO: ProcessCDR(1,14594582,1,1,2) [2025-03-02 23:47:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594582,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:47:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594582,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:47:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594582,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:47:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594582,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:47:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594582', 'tblTempUsageDetail_20' ) start [2025-03-02 23:47:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594582', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:47:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:47:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:47:24] Production.INFO: ==17607== Releasing lock... [2025-03-02 23:47:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:47:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:48:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:48:17] Production.INFO: count ==1335 [2025-03-02 23:48:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:48:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594587', 'tblTempUsageDetail_20' ) start [2025-03-02 23:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594587', 'tblTempUsageDetail_20' ) end [2025-03-02 23:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594587', 'tblTempVendorCDR_20' ) start [2025-03-02 23:48:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594587', 'tblTempVendorCDR_20' ) end [2025-03-02 23:48:17] Production.INFO: ProcessCDR(1,14594587,1,1,2) [2025-03-02 23:48:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594587,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:48:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594587,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:48:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594587,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:48:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594587,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:48:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594587', 'tblTempUsageDetail_20' ) start [2025-03-02 23:48:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594587', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:48:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:48:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:48:24] Production.INFO: ==17685== Releasing lock... [2025-03-02 23:48:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:48:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:49:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23:49: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:49:16] Production.INFO: count ==1335 [2025-03-02 23:49:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:49:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594592', 'tblTempUsageDetail_20' ) start [2025-03-02 23:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594592', 'tblTempUsageDetail_20' ) end [2025-03-02 23:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594592', 'tblTempVendorCDR_20' ) start [2025-03-02 23:49:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594592', 'tblTempVendorCDR_20' ) end [2025-03-02 23:49:16] Production.INFO: ProcessCDR(1,14594592,1,1,2) [2025-03-02 23:49:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594592,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:49:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594592,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:49:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594592,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:49:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594592,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:49:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594592', 'tblTempUsageDetail_20' ) start [2025-03-02 23:49:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594592', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:49:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:49:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:49:24] Production.INFO: ==17761== Releasing lock... [2025-03-02 23:49:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:49:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:50:05] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:50:17] Production.INFO: count ==1335 [2025-03-02 23:50:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:50:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594598', 'tblTempUsageDetail_20' ) start [2025-03-02 23:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594598', 'tblTempUsageDetail_20' ) end [2025-03-02 23:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594598', 'tblTempVendorCDR_20' ) start [2025-03-02 23:50:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594598', 'tblTempVendorCDR_20' ) end [2025-03-02 23:50:17] Production.INFO: ProcessCDR(1,14594598,1,1,2) [2025-03-02 23:50:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594598,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:50:20] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594598,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:50:20] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594598,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:50:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594598,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:50:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594598', 'tblTempUsageDetail_20' ) start [2025-03-02 23:50:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594598', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:50:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:50:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:50:25] Production.INFO: ==17895== Releasing lock... [2025-03-02 23:50:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:50:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:51:03] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23:51:03] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:51:15] Production.INFO: count ==1335 [2025-03-02 23:51:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:51:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594603', 'tblTempUsageDetail_20' ) start [2025-03-02 23:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594603', 'tblTempUsageDetail_20' ) end [2025-03-02 23:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594603', 'tblTempVendorCDR_20' ) start [2025-03-02 23:51:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594603', 'tblTempVendorCDR_20' ) end [2025-03-02 23:51:16] Production.INFO: ProcessCDR(1,14594603,1,1,2) [2025-03-02 23:51:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594603,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:51:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594603,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:51:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594603,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:51:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594603,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:51:20] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594603', 'tblTempUsageDetail_20' ) start [2025-03-02 23:51:22] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594603', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:51:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:51:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:51:23] Production.INFO: ==17974== Releasing lock... [2025-03-02 23:51:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:51:23] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:52:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23:52: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:52:16] Production.INFO: count ==1335 [2025-03-02 23:52:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:52:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594608', 'tblTempUsageDetail_20' ) start [2025-03-02 23:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594608', 'tblTempUsageDetail_20' ) end [2025-03-02 23:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594608', 'tblTempVendorCDR_20' ) start [2025-03-02 23:52:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594608', 'tblTempVendorCDR_20' ) end [2025-03-02 23:52:17] Production.INFO: ProcessCDR(1,14594608,1,1,2) [2025-03-02 23:52:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594608,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:52:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594608,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:52:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594608,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:52:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594608,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:52:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594608', 'tblTempUsageDetail_20' ) start [2025-03-02 23:52:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594608', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:52:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:52:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:52:24] Production.INFO: ==18057== Releasing lock... [2025-03-02 23:52:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:52:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:53:03] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23:53:03] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:53:15] Production.INFO: count ==1335 [2025-03-02 23:53:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:53:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594613', 'tblTempUsageDetail_20' ) start [2025-03-02 23:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594613', 'tblTempUsageDetail_20' ) end [2025-03-02 23:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594613', 'tblTempVendorCDR_20' ) start [2025-03-02 23:53:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594613', 'tblTempVendorCDR_20' ) end [2025-03-02 23:53:16] Production.INFO: ProcessCDR(1,14594613,1,1,2) [2025-03-02 23:53:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594613,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:53:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594613,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:53:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594613,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:53:20] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594613,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:53:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594613', 'tblTempUsageDetail_20' ) start [2025-03-02 23:53:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594613', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:53:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:53:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:53:23] Production.INFO: ==18141== Releasing lock... [2025-03-02 23:53:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:53:23] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:54:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23:54: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:54:16] Production.INFO: count ==1335 [2025-03-02 23:54:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:54:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594618', 'tblTempUsageDetail_20' ) start [2025-03-02 23:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594618', 'tblTempUsageDetail_20' ) end [2025-03-02 23:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594618', 'tblTempVendorCDR_20' ) start [2025-03-02 23:54:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594618', 'tblTempVendorCDR_20' ) end [2025-03-02 23:54:17] Production.INFO: ProcessCDR(1,14594618,1,1,2) [2025-03-02 23:54:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594618,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:54:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594618,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:54:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594618,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:54:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594618,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:54:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594618', 'tblTempUsageDetail_20' ) start [2025-03-02 23:54:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594618', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:54:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:54:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:54:25] Production.INFO: ==18228== Releasing lock... [2025-03-02 23:54:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:54:25] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:55:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23:55: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:55:16] Production.INFO: count ==1335 [2025-03-02 23:55:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:55:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594623', 'tblTempUsageDetail_20' ) start [2025-03-02 23:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594623', 'tblTempUsageDetail_20' ) end [2025-03-02 23:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594623', 'tblTempVendorCDR_20' ) start [2025-03-02 23:55:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594623', 'tblTempVendorCDR_20' ) end [2025-03-02 23:55:16] Production.INFO: ProcessCDR(1,14594623,1,1,2) [2025-03-02 23:55:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594623,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:55:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594623,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:55:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594623,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:55:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594623,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:55:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594623', 'tblTempUsageDetail_20' ) start [2025-03-02 23:55:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594623', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:55:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:55:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:55:23] Production.INFO: ==18305== Releasing lock... [2025-03-02 23:55:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:55:23] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:56:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23:56: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:56:16] Production.INFO: count ==1335 [2025-03-02 23:56:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:56:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594628', 'tblTempUsageDetail_20' ) start [2025-03-02 23:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594628', 'tblTempUsageDetail_20' ) end [2025-03-02 23:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594628', 'tblTempVendorCDR_20' ) start [2025-03-02 23:56:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594628', 'tblTempVendorCDR_20' ) end [2025-03-02 23:56:17] Production.INFO: ProcessCDR(1,14594628,1,1,2) [2025-03-02 23:56:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594628,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:56:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594628,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:56:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594628,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:56:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594628,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:56:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594628', 'tblTempUsageDetail_20' ) start [2025-03-02 23:56:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594628', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:56:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:56:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:56:24] Production.INFO: ==18387== Releasing lock... [2025-03-02 23:56:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:56:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:57:03] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23:57:03] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode, c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type, disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, pin.pc_description as pincode_name from asteriskcdrdb.cdr c left outer join asterisk.cc_callcosts cc on c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/ left outer join asterisk.pr_providers p on cc_pr_id = pr_id left outer join asterisk.te_tenants te ON te.te_code = c.accountcode left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode where `end` >= '2025-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:57:16] Production.INFO: count ==1335 [2025-03-02 23:57:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:57:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594633', 'tblTempUsageDetail_20' ) start [2025-03-02 23:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594633', 'tblTempUsageDetail_20' ) end [2025-03-02 23:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594633', 'tblTempVendorCDR_20' ) start [2025-03-02 23:57:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594633', 'tblTempVendorCDR_20' ) end [2025-03-02 23:57:16] Production.INFO: ProcessCDR(1,14594633,1,1,2) [2025-03-02 23:57:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594633,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:57:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594633,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:57:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594633,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:57:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594633,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:57:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594633', 'tblTempUsageDetail_20' ) start [2025-03-02 23:57:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594633', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:57:24] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:57:24] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:57:24] Production.INFO: ==18472== Releasing lock... [2025-03-02 23:57:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:57:24] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:58:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:58:16] Production.INFO: count ==1335 [2025-03-02 23:58:16] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:58:16] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594638', 'tblTempUsageDetail_20' ) start [2025-03-02 23:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594638', 'tblTempUsageDetail_20' ) end [2025-03-02 23:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594638', 'tblTempVendorCDR_20' ) start [2025-03-02 23:58:16] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594638', 'tblTempVendorCDR_20' ) end [2025-03-02 23:58:16] Production.INFO: ProcessCDR(1,14594638,1,1,2) [2025-03-02 23:58:16] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594638,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:58:18] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594638,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:58:18] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594638,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:58:21] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594638,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:58:21] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594638', 'tblTempUsageDetail_20' ) start [2025-03-02 23:58:23] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594638', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:58:23] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:58:23] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:58:23] Production.INFO: ==18549== Releasing lock... [2025-03-02 23:58:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:58:23] Production.INFO: 38.75 MB #Memory Used# [2025-03-02 23:59:04] Production.ERROR: Array ( [start_date_ymd] => 2025-03-02 17:49:05 [end_date_ymd] => 2025-03-02 20:49:05 [RateCDR] => 1 ) [2025-03-02 23: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-03-02 17:49:05' and `end` < '2025-03-02 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-03-02 23:59:16] Production.INFO: count ==1335 [2025-03-02 23:59:17] Production.ERROR: pbx CDR StartTime 2025-03-02 17:49:05 - End Time 2025-03-02 20:49:05 [2025-03-02 23:59:17] Production.ERROR: ========================== pbx transaction end ============================= [2025-03-02 23:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594643', 'tblTempUsageDetail_20' ) start [2025-03-02 23:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID ('1','1' , '14594643', 'tblTempUsageDetail_20' ) end [2025-03-02 23:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594643', 'tblTempVendorCDR_20' ) start [2025-03-02 23:59:17] Production.INFO: CALL prc_DeleteDuplicateUniqueID2 ('1','1' , '14594643', 'tblTempVendorCDR_20' ) end [2025-03-02 23:59:17] Production.INFO: ProcessCDR(1,14594643,1,1,2) [2025-03-02 23:59:17] Production.ERROR: start CALL prc_ProcesssVCDR( 1,1,14594643,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:59:19] Production.ERROR: end CALL prc_ProcesssVCDR( 1,1,14594643,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0') [2025-03-02 23:59:19] Production.ERROR: start CALL prc_ProcesssCDR( 1,1,14594643,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:59:22] Production.ERROR: end CALL prc_ProcesssCDR( 1,1,14594643,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0') [2025-03-02 23:59:22] Production.ERROR: PBX CALL prc_ProcessDiscountPlan ('14594643', 'tblTempUsageDetail_20' ) start [2025-03-02 23:59:24] Production.ERROR: exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:362 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(362): PDOStatement->execute(Array) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(616): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'CALL prc_Proce...', Array) #2 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #4 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #6 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #7 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #8 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #9 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #10 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #18 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #19 {main} Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 (SQL: CALL prc_ProcessDiscountPlan ('14594643', 'tblTempUsageDetail_20' ))' in /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624 Stack trace: #0 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(580): Illuminate\Database\Connection->runQueryCallback('CALL prc_Proce...', Array, Object(Closure)) #1 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/Connection.php(363): Illuminate\Database\Connection->run('CALL prc_Proce...', Array, Object(Closure)) #2 [internal function]: Illuminate\Database\Connection->statement('CALL prc_Proce...') #3 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(304): call_user_func_array(Array, Array) #4 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->__call('statement', Array) #5 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(210): Illuminate\Database\DatabaseManager->statement('CALL prc_Proce...') #6 /var/www/html/onswitch.neon.service/app/Console/Commands/PBXAccountUsage.php(0): Illuminate\Support\Facades\Facade::__callStatic('statement', Array) #7 [internal function]: App\Console\Commands\PBXAccountUsage->fire() #8 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Container/Container.php(526): call_user_func_array(Array, Array) #9 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(115): Illuminate\Container\Container->call(Array) #10 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Console/Command.php(101): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\PBXAccountUsage), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/onswitch.neon.service/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/onswitch.neon.service/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #16 /var/www/html/onswitch.neon.service/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #17 {main} [2025-03-02 23:59:25] Production.ERROR: **Email Sent Status 1 [2025-03-02 23:59:25] Production.ERROR: **Email Sent message Email has been sent [2025-03-02 23:59:25] Production.INFO: ==18632== Releasing lock... [2025-03-02 23:59:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops# [2025-03-02 23:59:25] Production.INFO: 38.75 MB #Memory Used#